PHP implementation of domain name WHOIS query code (data source million network, new network) _php tutorial

Source: Internet
Author: User
Million-net Whois (the interface used to provide a legal interface to the WAN)
Copy CodeThe code is 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 CodeThe 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];
}
}

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!

http://www.bkjia.com/PHPjc/321224.html www.bkjia.com true http://www.bkjia.com/PHPjc/321224.html techarticle the network whois (the interface used to provide a legal interface for the WAN) copy code code as follows: function Whois_hichina ($domain) {Preg_match ("|pre (. +?)" /pre|is ", @file_get_contents (' Http://whois ...

  • 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.