Baidu Link submitted three ways:
1, the initiative to push: the most rapid way of submission, recommend that you will be the site of the new output link immediately through this way to Baidu, to ensure that the new link can be included in time Baidu.
2, Sitemap: You can regularly put the site link to the sitemap, and then submit the Sitemap to Baidu. Baidu will periodically crawl check your submitted sitemap, the link in which to deal with, but included slower than the active push.
3, hand-submitted: One-time submit link to Baidu, you can use this way.
Here's how to use the Curl active push link with the PHP example, using the Curl extension:
$urls = Array (
' Http://www.example.com/1.html ',
' Http://www.example.com/2.html ',
);
$api = ' Http://data.zz.baidu.com/urls?site=www.dayecn.com&token=Db0ZoYUOwUyEp87Z ';
$ch = Curl_init ();
$options = Array (
Curlopt_url => $api,
Curlopt_post => True,
Curlopt_returntransfer => True,
Curlopt_postfields => implode ("\ \", $urls),
Curlopt_httpheader => Array (' Content-type:text/plain '),
);
Curl_setopt_array ($ch, $options);
$result = curl_exec ($ch);
echo $result;
First of all, Baidu Webmaster platform to verify the site, and then get token key, only the right to push the URL to Baidu. Baidu Webmaster Platform: http://zhanzhang.baidu.com
You can publish an article when the URL of this article to the Baidu Webmaster platform, or bulk push, through the return of the $result state to determine whether the push is successful, the return status code description:
Push success
The status code is 200, and the following fields may be returned:
Whether the field must be selected parameter type description
Success is the number of URL bars that int successfully pushed
Remain is the number of push URL bars remaining on the day of int
Not_same_site A list of URLs that are not processed because they are not the site URL
Not_valid no array of illegal URL lists
Successful return Example:
{
"Remain": 4999998,
"Success": 2,
"Not_same_site": [],
"Not_valid": []
}
Push failed
The status code is 4xx and the returned fields are:
Whether the field will be required type description
Error is int error code, same as status code
Message is a string error description
Failure return Example:
{
"Error": 401,
' Message ': ' token is not valid '
}