<?php if ($domain) { if ($domain) { $fp = fsockopen("rs.internic.net", 43, &$errno, &$errstr, 10); if (!$fp) { echo "$errstr ($errno)<br>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)<br>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 ("
文章网址:
随意转载^^但请附上教程地址。