PHP function: domain name whois query (using Wanwang and Xinwang interface query)_PHP tutorial

WBOY
Release: 2016-07-13 17:40:50
Original
969 people have browsed it

Function one:
//Wanwang whois (the interface used provides legal interface for Wanwang)
function whois_hichina($domain) {
preg_match ("|

(. ?)
|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
Please Enter the member area to view 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];
}
//Function call
echo whois_hichina(www.ite5e.com)

Function 2:
//Xinnet whois (not provided by Xinnet, just based on Xinnet URL modification implementation of the network's own website)
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];

}
//Function call
echo whois_xinnet(www.ite5e.com)
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486184.htmlTechArticleFunction 1: ?php //Wanwang whois (the interface used provides legal interface for Wanwang) function whois_hichina ($domain) { preg_match("|pre(. ?)/pre|is", @file_get_contents(http://whois.hichin...
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!