Home > Backend Development > PHP Tutorial > php写的域名查询系统whois_PHP

php写的域名查询系统whois_PHP

WBOY
Release: 2016-06-01 12:26:45
Original
1038 people have browsed it

WHOIS

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 ( "
Copy after login

");
}

}
?>

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

主机名:


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template