function sogouPush($url){
$postUrl = 'http://fankui.help.sogou.com/index.php/web/web/addShoulu';
$postData = array(
"source" => "1",
"site_type" => "1",
"Shoulu" => array("webAdr"=>$url,"email"=>"103@qq.com","reason"=>"")
);
$postData = http_build_query($postData);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $postUrl);
curl_setopt($curl, CURLOPT_USERAGENT,'Opera/9.80 (Windows NT 6.2; Win64; x64) Presto/2.12.388 Version/12.15');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // stop verifying certificate
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
$r = curl_exec($curl);
curl_close($curl);
print_r($r);
}
php curl推送搜狗链接收录
最新推荐文章于 2023-09-01 22:02:42 发布
本文介绍了一种使用PHP脚本向搜狗搜索引擎主动推送网站收录请求的方法。通过构造POST请求,发送包含网站地址、邮箱等信息的数据包至搜狗反馈平台,实现加速网站内容被搜索引擎抓取的目的。
929

被折叠的 条评论
为什么被折叠?



