首页/技术开发/内容

WHOIS类的更改版。

技术开发2024-01-16 阅读()
eregi ("No entries found", $array[$i])):
$this->FOUND=0;
 elseif(eregi( "WHOIS database is down",$array[$i])):
$this->ERROR++;
 $this->FOUND=0;
 elseif(eregi( "Please wait a while and try again",$array[$i])):
$this->ERROR++;
 $this->FOUND=0;
break;
endif;
$i++;
endwhile;
fclose($ptr);

if($this->DATA_COUNT>$this->DATA_MIN):
return($array);
else:
$this->ERROR++;
endif;
else:
$this->ERROR++;
endif;
}
};



$myWHOIS=new whois();

$thisname=$servername.$domainname;
// 根据国内域名或国际域名选择WHOIS SERVER
if (ereg(".cn$",$thisname))
{
$myWHOIS->WHOIS_SERVER="whois.cnnic.net.cn";
$array=$myWHOIS->cnrawlookup($thisname,$myWHOIS->WHOIS_SERVER);
}
else
{
$myWHOIS->WHOIS_SERVER="whois.internic.net";
//$myWHOIS->WHOIS_SERVER="whois.networksolutions.com";
$array=$myWHOIS->rawlookup($thisname,$myWHOIS->WHOIS_SERVER);
}



echo "<h2 align=center>".$thisname."</h2>";
echo "<table>";
$x=0;
while ($x<count($array))
{
echo "<tr><td>$x</td>";
echo "<td>$array[$x]</td>";
$x++;
}
echo "";

if (!ereg(".cn$",$thisname))
{
echo "<h2 align=center>Furth infomation</h2>";
$array_further=$myWHOIS->rawlookup($thisname,$myWHOIS->NEW_WHOIS);

echo "<table>";
$x=0;
while ($x<count($array_further))
{
echo "<tr><td>$x</td>";
echo "<td>$array_further[$x]</td>";
$x++;
}
echo "";
}

?>



第1页  第2页  第3页  第4页  第5页 

……

相关阅读