php写的域名查询系统whois_PHP教程

WBOY
發布: 2016-07-13 17:20:54
原創
888 人瀏覽過

if ($domain)
{
if ($domain)
{

$fp = fsockopen( "rs.internic.net", 43, &$errno, &$errstr, 10);
if (!$fp)
{
echo "$errstr ($errno)
n";
}
else
{
fputs($fp, "$domainrn");
while(!feof($fp))
{
$buf = fgets($fp,128);
if (ereg( "Whois Server:", $buf))
{
$server = str_replace( "Whois Server: ", "", $buf);
$server = trim($server);
}
}
fclose($fp);
}
if ($server)
{
echo "$domain is registered at $server:
";
echo "

"; <br>$fp = fsockopen($server, 43, &$errno, &$errstr, 10); <br>if(!$fp) <br>{ <br>echo "Could not open connection to $server on port 43.n"; <br>echo "$errstr ($errno)<br>n"; <br>} <br>else <br>{ <br>fputs($fp, "$domainrn"); <br>while(!feof($fp)) <br>{ <br>echo fgets($fp,128); <br>} <br>fclose($fp); <br>} <br>} <br>else { <br>echo( "<b>$domain does not appear to be registered.</b><br>"); <br>} <br>echo ( "
登入後複製

");
}

}
?>

查找 .com, .org, and .net 主机

主机名:



www.bkjia.comtruehttp://www.bkjia.com/PHPjc/532510.htmlTechArticle?PHP if ($domain) { if ($domain) { $fp = fsockopen( "rs.internic.net", 43, $errno, $errstr, 10); if (!$fp) { echo "$errstr ($errno)brn"; } else { fputs($fp, "$domainrn"); while(!fe...
相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板