zoukankan      html  css  js  c++  java
  • PHP域名whois查询代码(数据源万网、新网)

    对于whois查询,数据来自万网、新网,数据也比较权威,需要的朋友可以参考下。

    万网 whois(使用的接口为万网提供合法接口) 
    function whois_hichina($domain) { 
    preg_match("|<pre>(.+?)</pre>|is", @file_get_contents('http://whois.hichina.com/cgi-bin/whois?domain='.$domain.''), $whois); 
    $whois[0] = str_replace('友情提示:按注册局要求,过期域名可能会处于注册商自动续费期阶段,您在此查询所看到的域名到期日仅供参考<br />请您<a href="http://www.net.cn/has_client/userlogon/user_logon1.asp" target="_blank" class="link_gl">进入会员区</a>查看该域名的实际到期时间,并请及时进行续费,谢谢!', '', ($whois[0]));//过滤掉此段文字 www.jbxue.com
    return $whois[0]); 

    新网 whois (非新网提供,只是根据新网自身网站的url修改实现) 
    function whois_xinnet($domain) { 
    preg_match("|<div class="lyTableInfoWrap">(.+?)</div>|is", @file_get_contents('http://www.xinnet.cn/Modules/agent/serv/pages/domain_whois.jsp?domainNameWhois='.$domain.'&noCode=noCode'), $whois); 
    return $whois[0]; // www.jbxue.com

    上海电信测试,感觉新网的查询要快一点,且万网有些域名查询不出来的,新网亦可以查询到!
  • 相关阅读:
    我们怎样确保从大数据计算中获得价值
    大数据恐惧症
    大数据恐惧症
    一文读懂聚类算法
    一文读懂聚类算法
    用Python实现一个大数据搜索引擎
    用Python实现一个大数据搜索引擎
    No mysqld or mysql.server after mariadb-server install
    pip下载默认绕过代理
    linux下解压 tar.bz2
  • 原文地址:https://www.cnblogs.com/cfinder010/p/3551097.html
Copyright © 2011-2022 走看看