PHP Write domain name query system whois

Source: Internet
Author: User
Tags net php write query reset domain domain name
Query system Php
if ($domain)
{
if ($domain)
{

$fp = Fsockopen ("Rs.internic.net", & $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, & $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" >
Find. com,. org, and. NET Hosts

Host Name: <input type= "text" name= "domain" size= "maxlength=" >
<input type=submit value= "Find out" ><input type=reset value= "Reset" >
</FORM>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.