三度网教程:是一个免费提供流行视频软件教程、在线学习分享的学习平台!

php写的域名查询系统whois

时间:2024-2-12作者:未知来源:三度网教程人气:


<?PHP
if ($domain)
{
if ($domain)
{

$fp = fsockopen( "rs.internic.net", 43, &$errno, &$errstr, 10);
if (!$fp)
{
echo "$errstr ($errno)<br>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 "<B>$domain is registered at $server:</B><BR>";
echo "<PRE>";
$fp = fsockopen($server, 43, &$errno, &$errstr, 10);
if(!$fp)
{
echo "Could not open connection to $server on port 43.n";
echo "$errstr ($errno)<br>n";
}
else
{
fputs($fp, "$domainrn");
while(!feof($fp))
{
echo fgets($fp,128);
}
fclose($fp);
}
}
else {
echo( "<b>$domain does not appear to be registered.</b><BR>");
}
echo ( "</PRE><BR>");
}

}
?>
<FORM ACTION=" <?PHP echo($PHP_SELF); ?>" METHOD="post">
查找 .com, .org, and .net 主机<br>
主机名: <INPUT TYPE="text" NAME="domain" SIZE="40" MAXLENGTH="100">
<INPUT TYPE=submit VALUE="Find out"><INPUT TYPE=reset VALUE="Reset">
</FORM>

关键词:  php写的域名查询系统whois





Copyright © 2012-2018 三度网教程(http://www.3du8.cn) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版