| 1 | | 2 | | 3 | | 4 | | 5 | | 6 | | 7 | | 8 | | 9 | | 10 | | 11 | | 12 | | 13 | | 14 | | 15 | | 16 | | 17 | | 18 | | 19 | | 20 | | 21 | | 22 | | 23 | | 24 | | 25 | | 26 | | 27 | | 28 | | 29 | | 30 | | 31 | | 32 | | 33 | | 34 | | 35 | | 36 | | 37 | | 38 | | 39 | | 40 | | 41 | | 42 | | 43 | | 44 | | 45 | | 46 | | 47 | | 48 | | 49 | | 50 | | 51 | | 52 | | 53 | | 54 | | 55 | | 56 | | 57 | | 58 | | 59 | | | <?php | | | | //include "c:\winbinder\phpcode\include\winbinder.php"; //Uncomment this line if you are using winbinder, | | | | wb_init(); //This line is for miniPHP. exvision.net | | | | // Create window | | $winmain = wb_create_window(NULL, AppWindow, 'DChecker', WBC_CENTER, WBC_CENTER, 191, 170); | | wb_set_handler($winmain, "process_main"); | | | | // Control identifiers | | define('ID_PUSHBUTTON1', 1001); | | define('ID_EDITBOX1', 1002); | | define('ID_LABEL1', 1003); | | define('ID_LABEL2', 1004); | | define('ID_LABEL3', 1005); | | define('ID_HYPERLINK1', 1006); | | | | // Insert controls | | wb_create_control($winmain, PushButton, 'CheckDomain', 80, 70, 90, 25, ID_PUSHBUTTON1); | | wb_create_control($winmain, EditBox, '', 10, 40, 160, 20, ID_EDITBOX1); | | wb_create_control($winmain, Label, 'Type the domain to check below!', 10, 10, 160, 15, ID_LABEL1); | | wb_create_control($winmain, Label, 'STATUS:', 10, 110, 40, 15, ID_LABEL2); | | wb_create_control($winmain, Label, '', 65, 110, 105, 15, ID_LABEL3); | | wb_create_control($winmain, HyperLink, 'amp | o.Toom', 60, 135, 70, 15, ID_HYPERLINK1); | | | | // Main loop | | wb_main_loop(); | | | | function process_main($window, $id) | | { | | switch($id) { | | | | case ID_PUSHBUTTON1: | | $domain = wb_get_text(wb_get_control($window, ID_EDITBOX1)); | | $contents = file_get_contents("http://www.whois.net/whois_new.cgi?d=".$domain); | | | | if(preg_match("/Available for you now!/i", $contents)) | | { | | wb_set_text(wb_get_control($window, ID_LABEL3), "Available"); | | } else { | | wb_set_text(wb_get_control($window, ID_LABEL3), "In Use"); | | } | | | | $fp2 = fopen("var_dump.html","w"); fwrite($fp2,$contents); fclose($fp2); | | break; | | | | case ID_HYPERLINK1: | | wb_exec("http://google.com"); | | break; | | | | case IDCLOSE: | | wb_destroy_window($window); | | break; | | } | | | | } | | | | ?> |
|