[thelist] Domain whois PHP + Code
Andrew Maynes
andrew at humanbehaviour.co.uk
Wed Jan 15 12:19:00 CST 2003
without sounding as stupid as I am...
should I just add more servers to the $whoisserver or do I have to do more work
on this bit of code?
$query = $domname."@".$whoisserver;
or to all of the code?
if($type == 'all' or $type == 'com')
{
$comarray =
array($domain.".co.uk",$domain.".com",$domain.".net",$domain.".org");
$comcount = count($comarray);
$i=0;
for ($i=0;$i<$comcount;$i++) {
$domname = $comarray[$i];
$query = $domname."@".$whoisserver;
$result = "";
$ns = fsockopen($whoisserver,43); fputs($ns,"$domname\r\n");
while(!feof($ns)) $result .= fgets($ns,128); fclose($ns);
if (eregi($whoisnomatch,$result)) { dispav($domname); } else
dispun($domname,$whoisserver); }
}
Cheers
Andrew
More information about the thelist
mailing list