Home  >  Article  >  php教程  >  PHP备案信息查询函数

PHP备案信息查询函数

WBOY
WBOYOriginal
2016-06-07 11:44:58884browse

该代码由炫彩七零(QQ781787584)原创发布,转载请注明。。。。代码内容部分被过滤,请下载附件
<?php <br /> // Author 70<br> // QQ 781787584<br> // WebSite http://sysyun.com<br> function miibeian($domain) {<br>     $domain = base64_encode ( $domain );<br>     $opts = array (<br>             'http' => array (<br>                     'method' => "GET",<br>                     'timeout' => 5 <br>             ) <br>     );<br>     $context = stream_context_create ( $opts );<br>     $url = 'http://webid.360.cn/complaininfo.php?domain=' . $domain;<br>     $html = file_get_contents ( $url, false, $context );<br>     if (strpos ( $html, '未查询到网站信息' )) {<br>         return false;<br>     }<br>     $flag = '<ul>';<br>     $start = strpos ( $html, $flag ) + strlen ( $flag );<br>     $info = substr ( $html, $start, strpos ( $html, '</ul>' ) - $start );<br>     <br>     $info = str_replace ( '    ', '', $info );<br>     $info = str_replace ( '<li> <strong>网站名称:</strong>', '', $info );<br>     $info = str_replace ( '</li> <li> <strong>网站首页地址:</strong>', '@', $info );<br>     $info = str_replace ( '</li> <li> <strong>主办单位名称:</strong>', '@', $info );<br>     $info = str_replace ( '</li> <li> <strong>主办单位性质:</strong>', '@', $info );<br>     $info = str_replace ( '</li> <li> <strong>审核时间:</strong>', ' ', $info );<br>     $info = str_replace ( '</li> <li> <strong>网站备案/许可证号:</strong>', ' ', $info );<br>     $info = str_replace ( "\r\n", '', $info );<br>     $info = str_replace ( '</li>', '', $info );<br>     $info = trim ( $info );<br>     $temp = explode ( '@', $info );<br>     return $temp;<br> }<br> // http://webid.360.cn/complaininfo.php?domain=c3lzeXVuLmNvbQ==<br> $result = miibeian ( 'sysyun.com' );<br> print_r ( $result );

附件 beian.rar ( 723 B 下载:152 次 )

AD:真正免费,域名+虚机+企业邮箱=0元

Statement:
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