PHP查询whois数据库

时间:2014-12-04 14:26:17

标签: php whois

我正在连接到tld特定的whois数据库以获取whois信息。 有些人刚回来:

Domain: domain.de
Status: connect
例如,

.com工作得很好 我怎样才能获得完整的whois信息?

我的代码:

$lookup = "";
    if(strlen($whois) > 0) {
        $fp = fsockopen($whois, 43, $errno, $errstr);
    } else {
        $fp = fsockopen(trim($server->server), 43, $errno, $errstr);
    }

    if (!$fp) {
        echo "ERROR: $errno - $errstr<br />\n";
    }
    fwrite($fp, "".$domain."\r\n");
    while (!feof($fp)) {
        $lookup .= fgets($fp);
    }
    fclose($fp);

1 个答案:

答案 0 :(得分:0)

.dewhois.denic.de开展。默认情况下,在连接到whois.denic.de时,他们不会披露有关域所有者的隐私信息。条款和条件说:

% The DENIC whois service on port 43 never discloses any information concerning
% the domain holder/administrative contact. Information concerning the domain
% holder/administrative contact can be obtained through use of our web-based
% whois service available at the DENIC website:
% http://www.denic.de/en/domains/whois-service/web-whois.html