Telephone: 01243 216115

Domain Result

0){ // Create Whois Server Array $server[‘nic’] = “whois.nic.uk:No match for”; $server[‘crsnic’] = “whois.crsnic.net:No match for”; // Create Extension Array $domainInfo[‘.co.uk’] = “nic”; $domainInfo[‘.ltd.uk’] = “nic”; $domainInfo[‘.me.uk’] = “nic”; $domainInfo[‘.net.uk’] = “nic”; $domainInfo[‘.org.uk’] = “nic”; $domainInfo[‘.plc.uk’] = “nic”; $domainInfo[‘.sch.uk’] = “nic”; $domainInfo[‘.com’] = “crsnic”; $domainInfo[‘.net’] = “crsnic”; $domainInfo[‘.org’] = “crsnic”; // Separate Domain and Extension $fullDomain = $_POST[‘domain’]; $parts = explode(“.”,$fullDomain); $domain = $parts[0]; $extension = str_replace($domain,””,$fullDomain); // Find Whois Server and Text to Match $tempServer = $domainInfo[$extension]; $whoisDetails = $server[$tempServer]; $splitWhois = explode(“:”,$whoisDetails); $whoisServer = $splitWhois[0]; $textToMatch = $splitWhois[1]; // Query WHOIS Server for Domain $port = 43; $domainName = $domain . $extension . “\n”; $fp = fsockopen($whoisServer,43); fputs($fp, $domainName); while (!feof($fp)) $whoisRecord .= fgets($fp,128); fclose($fp); $whoisRecord = str_replace(“\n”,”
“,$whoisRecord); // Check Whether Domain is Registered or not if(strstr($whoisRecord, $textToMatch) != FALSE){ $registered = 0; } else { $registered = 1; } // Output Results if($registered==0){ echo $domain . $extension . ” is not registered. “; echo ‘Register Domain.’; } else { echo $domain . $extension . ” is registered. WHOIS Details:”; echo “

“; echo $whoisRecord; } } ?>
Nominet Member logo

Copyright © 2021 Essel. Essel is a trademark of Stephen and Wendy Lawrance.