/* DomainWhois Version 1.0 (c) BlueWebStar - Internet Agentur */ require("config.php"); ?>
".$whoisresult.""; } function get_whois_server($domain){ $whoisservers=array(array("de","whois.denic.de"),array("com","rs.internic.net"),array("net","rs.internic.net"),array("org","whois.pir.org"),array("info","whois.afilias.net"),array("biz","whois.biz"),array("eu","whois.eu"),array("at","whois.nic.at"),array("ch","whois.nic.ch"),array("li","whois.nic.ch"),array("co.uk","whois.nic.uk"),array("tv","whois.www.tv"),array("cc","whois.nic.cc"),array("dk","whois.dk-hostmaster.dk"),array("it","whois.nic.it"),array("us","whois.nic.us"),array("be","whois.dns.be"),array("ag","whois.nic.ag"),array("cn","whois.cnnic.net.cn"),array("nl","whois.domain-registry.nl"),array("tk","whois.dot.tk"),array("se","whois.nic-se.se"),array("ws","whois.worldsite.ws")); $whocnt = count($whoisservers); for ($x=0;$x<$whocnt;$x++){ $artld = $whoisservers[$x][0]; $tldlen = intval(0 - strlen($artld)); if (substr($domain, $tldlen) == $artld) $whosrv = $whoisservers[$x][1]; } return $whosrv; } function lookup($dom){ $lusrv = get_whois_server($dom); if (!$lusrv) return ""; $fp = fsockopen($lusrv,43); if($lusrv == "whois.denic.de") fputs($fp, "-C ISO-8859-1 -T ace,dn $dom\r\n"); else fputs($fp, "$dom\r\n"); $string=""; while(!feof($fp)){ $string.= fgets($fp,128); } fclose($fp); $reg = "/Whois Server: (.*?)\n/i"; preg_match_all($reg, $string, $matches); $secondtry = $matches[1][0]; if ($secondtry){ $fp = fsockopen($secondtry,43); fputs($fp, "$dom\r\n"); $string=""; while(!feof($fp)){ $string.=fgets($fp,128); } fclose($fp); } if(ereg("(No match|No entries found|NOT FOUND|Not found|not found in database|We do not have an entry in our database matching your query)",$string)) { echo "Ergebnis der Domainsuche ".$dom.""; } else { echo "Ergebnis der Domainsuche ".$dom.""; $whois = "".$string.""; $copy = "DomainWhois Version1.0 (c) by BlueWebStar - Internet Agentur"; return $whois.$copy; } } ?> |