Php-written domain name query system whois

Source: Internet
Author: User

Introduction: This is a detailed page of the domain name query system whois written by PHP. It introduces the related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 330401 'rolling = 'no'>
<? 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 "cocould 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 ">
Search for. com,. org, And. Net hosts

Host Name: <input type = "text" name = "Domain" size = "40" maxlength = "100">
<Input type = submit value = "find out"> <input type = reset value = "reset">
</Form>

More articles on "PHP-written domain name query system whois"

Love J2EE follow Java Michael Jackson video station JSON online tools

http://biancheng.dnbcw.info/php/330401.html pageno: 11

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.