Home > php教程 > php手册 > PHP写的域名查询系统Whois

PHP写的域名查询系统Whois

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-25 16:51:45
Original
879 people have browsed it

               
<?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 ("
Copy after login

"); } } ?>
查找 .com, .org, and .net 主机
主机名:


文章网址:

随意转载^^但请附上教程地址。

Related labels:
php
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template