写一份像百度这种的PHP推送示例就行, bing 的多了个主域名,两个要放在一起提交 这个后面的内容地址 咋批量啊? "siteUrl":"http://yoursite.com",​"urlList":["http://yoursite.com/url1","http://yoursite.com/url2"]
有这方面的技术大佬 给瞅瞅啊
百度的API推送示例
$urls = array( 'http://www.example.com/1.html', 'http://www.example.com/2.html', ); $api = 'http://data.zz.baidu.com'; $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); echo $result;
bing的示例
JSON request sample:
POST /webmaster/api.svc/json/SubmitUrlbatch?​apikey=123456 HTTP/1.1​ Content-Type: application/json; charset=utf-8​ Host: ssl.bing.com​
{ "siteUrl":"http://yoursite.com",​ "urlList":[ "http://yoursite.com/url1", "http://yoursite.com/url2", "http://yoursite.com/url3" ] }
JSON response sample:
HTTP/1.1 200 OK Content-Length: 10 Content-Type: application/json; charset=utf-8
{ "d":null }
|