array("whois_server" => "whois.verisign-grs.com"), ".net" => array("whois_server" => "whois.verisign-grs.com"), ".org" => array("whois_server" => "whois.publicinterestregistry.net"), ".info" => array("whois_server" => "whois.afilias.info"), ".biz" => array("whois_server" => "whois.biz"), ".co.uk" => array("whois_server" => "whois.nic.uk"), ".ca" => array("whois_server" => "whois.cira.ca"), ".com.au" => array("whois_server" => "whois.audns.net.au") // PRO script has extended list of supported extensions // See a demo of the pro version here: http://whoislookupscript.com/demo_pro_script.php ); $extensions_array = array_keys($supported_extensions); if ($_SERVER['REQUEST_METHOD'] == "POST") { // Trim post values and make lower-case. foreach ($_POST as $key => $value) { $_POST[$key] = strtolower(trim($value)); } // Check submitted values. $errors = array(); // Check domain and extension are present and have values. if (!isset($_POST['domain']) || empty($_POST['domain']) || !isset($_POST['extension']) || empty($_POST['extension'])) { $errors[] = "Please enter a domain name."; } // Check domain. if (isset($_POST['domain']) && !empty($_POST['domain'])) { // Remove spaces. $_POST['domain'] = str_replace(" ", "", $_POST['domain']); // Check length of domain. if (strlen($_POST['domain']) > 63) { $errors[] = "Domain is too long. Max 63 characters."; } // Check domain for acceptable characters. if (!preg_match('/^[0-9a-zA-Z-]+$/i', $_POST['domain'])) { $errors[] = "Domain may only contain numbers, letters or hyphens."; } // Check domain doesn't begin or end with a hyphen. if (substr(stripslashes($_POST['domain']), 0, 1) == "-" || substr(stripslashes($_POST['domain']), -1) == "-") { $errors[] = "Domain may not begin or end with a hyphen."; } } // Check extension is acceptable. Extension should be lower case at this point for testing in the case-sensitive in_array(). if (!in_array($_POST['extension'], $extensions_array)) { $errors[] = "Domain extension is not supported."; } if (!count($errors)) { $domain = $_POST['domain']; $extension = $_POST['extension']; $whois_servers = array( "whois.afilias.info" => array("port" => "43","query_begin" => "","query_end" => "\r\n","redirect" => "0","redirect_string" => "","no_match_string" => "NOT FOUND","match_string" => "Domain Name:","encoding" => "UTF-8"), "whois.audns.net.au" => array("port" => "43","query_begin" => "","query_end" => "\r\n","redirect" => "0","redirect_string" => "","no_match_string" => "No Data Found","match_string" => "Domain Name:","encoding" => "UTF-8"), "whois.biz" => array("port" => "43","query_begin" => "","query_end" => "\r\n","redirect" => "0","redirect_string" => "","no_match_string" => "Not found:","match_string" => "Registrant Name:","encoding" => "iso-8859-1"), "whois.cira.ca" => array("port" => "43","query_begin" => "","query_end" => "\r\n","redirect" => "0","redirect_string" => "","no_match_string" => "Domain status: available","match_string" => "Domain status: registered","encoding" => "UTF-8"), "whois.nic.uk" => array("port" => "43","query_begin" => "","query_end" => "\r\n","redirect" => "0","redirect_string" => "","no_match_string" => "No match for","encoding" => "iso-8859-1"), "whois.publicinterestregistry.net" => array("port" => "43","query_begin" => "","query_end" => "\r\n","redirect" => "0","redirect_string" => "","no_match_string" => "NOT FOUND","encoding" => "iso-8859-1"), "whois.verisign-grs.com" => array("port" => "43","query_begin" => "domain ","query_end" => "\r\n","redirect" => "1","redirect_string" => "Registrar WHOIS Server:","no_match_string" => "No match for domain","encoding" => "iso-8859-1") // PRO version of this script has more detailed configuration // See a demo of the pro version here: http://whoislookupscript.com/demo_pro_script.php ); $whois_server = $supported_extensions[$extension]['whois_server']; $port = $whois_servers[$whois_server]['port']; $query_begin = $whois_servers[$whois_server]['query_begin']; $query_end = $whois_servers[$whois_server]['query_end']; $whois_redirect_check = $whois_servers[$whois_server]['redirect']; $whois_redirect_string = $whois_servers[$whois_server]['redirect_string']; $no_match_string = $whois_servers[$whois_server]['no_match_string']; $encoding = $whois_servers[$whois_server]['encoding']; $whois_redirect_server = ""; $response = ""; $line = ""; $fp = fsockopen($whois_server, $port, $errno, $errstr, $connection_timeout); if (!$fp) { print "fsockopen() error when trying to connect to {$whois_server}

Error number: ".$errno."
"."Error message: ".$errstr; exit; } fputs($fp, $query_begin.$domain.$extension.$query_end); while (!feof($fp)) { $line = fgets($fp); $response .= $line; // Check for whois redirect server. if ($whois_redirect_check && stristr($line, $whois_redirect_string)) { $whois_redirect_server = trim(str_replace($whois_redirect_string, "", $line)); break; } } fclose($fp); // Query redirect server if set. if ($whois_redirect_server) { // Query the redirect server. Might be different values for port etc, so give the option to change them from those set previously. Using defaults below. $whois_server = $whois_redirect_server; $port = "43"; $connection_timeout = 5; $query_begin = ""; $query_end = "\r\n"; $response = ""; $fp = fsockopen($whois_server, $port, $errno, $errstr, $connection_timeout); if (!$fp) { print "fsockopen() error when trying to connect to {$whois_server}

Error number: ".$errno."
"."Error message: ".$errstr; exit; } fputs($fp, $query_begin.$domain.$extension.$query_end); while (!feof($fp)) { $response .= fgets($fp); } fclose($fp); } // Check result for no-match phrase. $domain_registered_message = ""; if (stristr($response, $no_match_string)) { $domain_registered_message = "" . htmlentities($domain . $extension) . " is not registered"; } else { $domain_registered_message = "" . htmlentities($domain . $extension) . " is registered"; } } } // Set a default encoding for the form page. If a WHOIS server uses a particular encoding it will be set above if the form is posted without errors. if (!isset($encoding)) { $encoding = "UTF-8"; } ?>

Hooray! Get Free Web Hosting with every domain, you register with usClaim Now!

Whois Lookup

Last updated on November 25th, 2020





This site offers a WHOIS lookup service which allows you to perform a WHOIS lookup on a domain name to see who owns it or to see if it's available for registration. This service queries the appropriate WHOIS server for the domain name and displays the response which is a public record that anyone can see. In some cases, the owner of a domain name (the "registrant") may choose not to have their address and contact information displayed.