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