PHP提交百度收录(普通收录)
分类:PHP函数库
时间:2021-03-24
浏览:395
PHP提交百度收录,下面介绍一中普通提交的模式
代码如下 :
$url_list=['链接1','链接2'];
$bd_tsjk = '百度提交接口';
$urls = $url_list;
$ch = curl_init();
$options = array(
CURLOPT_URL => $api,
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => implode("\n", $urls),
CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
);
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
本站文章如未注明出处则为原创,转载请注明出处,如有侵权请邮件联系站长