Whois PHP implementation of domain name WHOIS query code data source million network, new network

Source: Internet
Author: User
Million-net Whois (the interface used to provide a legal interface to the WAN)

Copy the Code code as follows:


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 tip: The expired domain name may be at the Registrar's Auto-renewal period, as requested by the registry, and you will see the domain expiration date for reference only
Please enter the member area to see the actual expiry time of the domain name, and please timely renewal, thank you! ', ', ($whois [0]);//filter out this paragraph of text
return $whois [0]);
}


New network Whois (non-new network provided, only based on the new Web site URL modification implementation)

Copy the Code code 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];
}
}


Shanghai Telecom Test, feel the new Web query to a little faster, and million network some domain name query not come out, the new network can also be queried!

The above describes the Whois PHP implementation of the domain name whois query code data source million network, the new network, including the content of whois, I hope to be interested in PHP tutorial friends helpful.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.