<?php
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 "<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)
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 主机
主机名: <input type="text" name="domain" size="40" maxlength="100">
<input type=submit value="find out"><input type=reset value="reset">
</form>注册会员,创建你的web开发资料库,