<?php error_reporting(0); $u = $_GET['url']; var_dump(); if(!isset($u)){ echo '?url=qq.com'; die; } $a = file_get_contents('http://icp.chinaz.com/info?q='.$u); $p = '/<td align="left" class="by1" width="30%">(.*?)</td>/'; preg_match_all($p,$a,$m); $p1 = '/<td align="left" class="by2" width="30%">(.*?)</td>/'; preg_match($p1,$a,$m1); $p2 = '/<td width="29%" align="left" class="by1">(.*?)</td>/'; preg_match($p2,$a,$m2); $p3 = '/<td align="left" class="by2">(.*?)</td>/'; preg_match($p3,$a,$m3); $p4 = '/<td align="left" class="by2" width="30%" id="mpage">(.*?)</td>/is'; preg_match($p4,$a,$m4); $p5 = '/<td align="left" class="by1">(.*?)</td>/'; preg_match_all($p5,$a,$m5); $data['备案号'] = $m[1][0]; $data['网站名称'] = $m[1][1]; $data['审核时间'] = $m1[1]; $data['主办单位'] = $m2[1]; $data['主办单位性质'] = $m3[1]; $data['网站首页地址'] = $m4[1]; $data['网站备案/许可证号'] = $m5[1][1]; if(strpos($m[0][0],'-') == 41){ $arr = ['code'=>500,'msg'=>'未备案']; print_r(json_encode($arr,JSON_UNESCAPED_UNICODE)); }else{ print_r(json_encode($data,JSON_UNESCAPED_UNICODE)); }
API
2022-06-15 121API是开发中必备知识点,合理的应用API可以大大节省开发成本,为您整理收集了包含API接口的信息,包含API接口,API代码,API源码,助你更快的学习使用API技术....
- 带五套模板的API接口系统源码 [2024-01-18]
- layui框架API接口调用管理系统源码 [2024-01-16]
- 小西瓜API管理系统源码2.0 [2023-12-07]
- ApiDebug在线api接口调试浏览器插件 [2023-12-07]
- 抖音短视频去水印官方API接口源码 [2023-10-04]