萬網 whois(使用的介面為萬網提供合法介面)
複製代碼 代碼如下:
function whois_hichina($domain) {
preg_match("|
(.+?)
|is", @file_get_contents('http://whois.hichina.com/cgi-bin/whois?domain='.$domain.''), $whois);
$whois[0] = str_replace('友情提示:按註冊局要求,到期網域名稱可能會處於註冊商自動續約期階段,您在此查詢所看到的網域名稱到期日僅供參考
請您進入會員區查看該網域名稱的實際到期時間,並請及時進行續約,謝謝!', '', ($whois[0]));//過濾掉此段文字
return $whois[0]);
}
新網 whois (非新網提供,只是根據新網自身網站的url修改實現)
複製代碼 代碼如下:
function whois_xinnet($domain) {
preg_match("|(.+?)|is", @file_get_contents('http://www.xinnet.cn/Modules/agent/serv/pages/domain_whois.jsp?domainNameWhois='.$domain.'&noCode=noCode'), $whois);
return $whois[0];
}
}
上海電信測試,感覺新網的查詢要快一點,且萬網有些網域名稱查詢不出來的,新網亦可以查詢到!
http://www.bkjia.com/PHPjc/321224.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/321224.htmlTechArticle萬網 whois(使用的介面為萬網提供合法介面) 複製代碼 代碼如下: function whois_hichina($domain) { preg_match("|pre(.+?)/pre|is", @file_get_contents('http://whois...