//文章百度收录判断 $url = get_permalink(); $result = file_get_contents("https://www.520yxl.cn/api/baidu.php?domain=".$url);//此处的api接口连接可以换成自己的 $arr=json_decode($result,true); if ($arr['code']==200) { echo '已收录'; } else { echo '暂未收录'; }