Wanwang whois (the interface used provides legal interface for Wanwang)
Copy the code The code is as follows:
function whois_hichina($domain) {
preg_match("|
(.+?)< ;/pre>|is", @file_get_contents('http://whois.hichina.com/cgi-bin/whois?domain='.$domain.''), $whois);
$whois[0] = str_replace('Friendly reminder: According to the requirements of the registry, expired domain names may be in the automatic renewal period of the registrar. The domain name expiration date you see in this query is for reference only
PleaseEnter the member areaCheck the actual expiration time of the domain name, and please renew it in time. Thank you! ', '', ($whois[0]));//Filter out this text
return $whois[0]);
}
Xinnet whois (not provided by Xinnet, just based on Xinnet URL modification implementation of own website)Copy the code The code is as follows:
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];
}
}
Tested by Shanghai Telecom, I feel that the query on Xinwang is faster, and some domain names that cannot be queried on Wanwang can also be queried on Xinwang!The above introduces whois PHP to implement domain name whois query code data source Wanwang, Xinwang, including whois content, I hope it will be helpful to friends who are interested in PHP tutorials.