使用:传入一个网址,如 http://jb51.net/article/1.html ,返回1,代表已经收录;返回0,代表百度没有收录。
复制代码 代码如下:<?phpheader(“Content-type: text/html; charset=utf-8”);
function checkBaidu($url) { $url = ‘http://www.baidu.com/s?wd=’ . $url;
$curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CU