PHP:ICP备案查询PHP源代码

180it 2019-09-27 PM 3611℃ 0条

调用方式说明:
GET提交,name值就是你要查询的域名。

PHP源代码:
<?php
$res = @$_GET['name'];
if(strstr($res,"."))
{
$json = file_get_contents('http://icp.chinaz.com/'.$res); //调用的站长工具
function GetBetween($content,$start,$end){
$r = explode($start, $content);
if (isset($r[1])){
$r = explode($end, $r[1]);
return $r[0];
}
return '';
}
// 获取主办单位名称
$b ='主办单位名称

';
$c ='<';
$name = GetBetween($json,$b,$c);
// 获取性质
$b ='主办单位性质

';
$c ='<';
$nature = GetBetween($json,$b,$c);
// 获取备案号
$b ='网站备案/许可证号

';
$c ='<';
$icp = GetBetween($json,$b,$c);
// 获取网站名称
$b ='网站名称

';
$c ='<';
$sitename = GetBetween($json,$b,$c);
// 获取网站首页地址
$b ='网站首页网址

';
$c ='<';
$index = GetBetween($json,$b,$c);
if(strstr($index,"."))
{ }else{
echo "

未查到此域名的备案信息!

Copyright © 2015-2017 mlwei.com All Rights Reserved. 名流互联 版权所有
";
exit();
}
// 获取审核时间
$b ='审核时间

';
$c ='<';
$time = GetBetween($json,$b,$c);
echo '<!DOCTYPE html>





网站备案详细信息以及ICP备案号_ICP备案查询网

序号 主办单位名称 主办单位性质 网站备案/许可证号 网站名称 网站首页网址 审核时间 是否限制接入 详细信息
1
'. $name.'
'. $nature.'
'. $icp.' '.$sitename.'
'.$time.'
详细信息



Copyright © 2015-2017 mlwei.com All Rights Reserved. 名流互联 版权所有


';
}else{
echo "
不给我域名查你MMP?

Copyright © 2015-2017 mlwei.com All Rights Reserved. 名流互联 版权所有
";
// echo "内容不为空";
// return false;
exit();
}
?>

支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

PHP:ICP备案查询PHP源代码