当前位置: 首页 > 新闻动态 > 软件编程

php实现的获取网站备案信息查询代码(360)

作者:用户投稿 浏览: 发布日期:2026-01-16
[导读]:有时候我们需要获取网站备案信息,那么就可以用这个小偷程序,获取了,信息从360抓取
复制代码 代码如下:
<?php  
 // WebSite http://www.micxp.com 
function miibeian($domain) {  
    $domain = base64_encode ( $domain );  
    $opts = array (  
            'http' => array (  
                    'method' => "GET",  
                    'timeout' => 5   
            )   
    );  
    $context = stream_context_create ( $opts );  
    $url = 'http://webid.360.cn/complaininfo.php?domain=' . $domain; 
    $html = file_get_contents ( $url, false, $context );  
    if (strpos ( $html, '未查询到网站信息' )) {  
        return false;  
    }  
    $flag = '<ul>';  
    $start = strpos ( $html, $flag ) + strlen ( $flag );  
    $info = substr ( $html, $start, strpos ( $html, '</ul>' ) - $start );  

    $info = str_replace ( ' ', '', $info );  
    $info = str_replace ( '<li><strong>网站名称:</strong>', '', $info );  
    $info = str_replace ( '<li><strong>网站首页地址:</strong>', '&nbsp;', $info );  
    $info = str_replace ( '<li><strong>主办单位名称:</strong>', '&nbsp;', $info );  
    $info = str_replace ( '<li><strong>主办单位性质:</strong>', '&nbsp;', $info );  
    $info = str_replace ( '<li><strong>审核时间:</strong>', '&nbsp;', $info );  
    $info = str_replace ( '<li><strong>网站备案/许可证号:</strong>', '&nbsp;', $info );  
    $info = str_replace ( "\r\n", '', $info );  
    $info = str_replace ( '</li>', '', $info );  
    $info = trim ( $info );  
    $temp = explode ( '&nbsp;', $info );  
    return $temp;  
}  
// http://webid.360.cn/complaininfo.php?domain=c3lzeXVuLmNvbQ== 
$result = miibeian ( '' );  
print_r ( $result );
免责声明:转载请注明出处:http://m.lexweb.cn/news/208448.html

扫一扫高效沟通

多一份参考总有益处

免费领取网站策划SEO优化策划方案

请填写下方表单,我们会尽快与您联系
感谢您的咨询,我们会尽快给您回复!