1、在dede下找到article_add.php文件,打开查找
ClearMyAddon($arcID, $title);
2、在这句代码下面添加
function submit_bing($site_url, $url_list, $api_key) {
$bych = curl_init();
curl_setopt($bych, CURLOPT_URL, "https://ssl.bing.com//webmaster/api.svc/json/SubmitUrlbatch?apikey={$api_key}");
curl_setopt($bych, CURLOPT_POST, 1);
curl_setopt($bych, CURLOPT_POSTFIELDS, json_encode([
'siteUrl' => $site_url,
'urlList' => $url_list
]));
curl_setopt($bych, CURLOPT_RETURNTRANSFER, true);
curl_setopt($bych, CURLOPT_HTTPHEADER, [
'Host: ssl.bing.com',
'Content-Type: application/json; charset=utf-8'
]);
$byresponse = curl_exec($bych);
$http_code = curl_getinfo($bych, CURLINFO_HTTP_CODE);
curl_close($bych);
}
$apiKey = '必应后台获取api密匙';
$siteUrl = 'https://www.baidu.com';
$urlList = $siteUrl . $artUrl;
$urlList = explode(",",$urlList);
submit_bing($siteUrl, $urlList, $apiKey);
在必应站长后台查看url提交是否正确