Home > Backend Development > PHP Tutorial > 检测域名是否被注册的程序_PHP

检测域名是否被注册的程序_PHP

WBOY
Release: 2016-06-01 12:28:36
Original
1269 people have browsed it

if ($domain)

{

if ($domain)

{

// first get the domain server from internic



$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 在 $server 被注册:



下面是详细注册信息:
";

echo "

"; <br><br>$fp = fsockopen($server, 43, &$errno, &$errstr, 10); <br><br>if(!$fp) <br><br>{ <br><br>echo "Could not open connection to $server on port 43.n"; <br><br>echo "$errstr ($errno)<br><br>n"; <br><br>} <br><br>else <br><br>{ <br><br>fputs($fp, "$domainrn"); <br><br>while(!feof($fp)) <br><br>{ <br><br>echo fgets($fp,128); <br><br>} <br><br>fclose($fp); <br><br>} <br><br>} <br><br>else { <br><br>echo( "<b>祝贺你!$domain 在 $now(time) <br><br>这一刻还没被注册,国际域名正在以5秒每个的速度减少,请在齐鲁热线注册。</b><br>"); <br><br>} <br><br>echo ( "
Copy after login

");

}



}

?>

FORM ACTION=" " METHOD="post">

检索你要注册的域名
看是否被注册 i>yourname/i>.com, .org, and .net domains



domain
:www. INPUT TYPE="text" NAME="domain" SIZE="40" MAXLENGTH="100">

INPUT TYPE=submit VALUE="Find out">INPUT TYPE=reset VALUE="Reset">

/FORM>
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