Webmasters can inform Baidu about the frequent update in their blog using Baidu’s ping service. Baidu offers both manual ping service as well as auto ping service and here we discuss about auto ping service in detail. Ping service is based on a standard XML_RPC protocol update notification service for blog updates. Your content update is notified to Baidu quickly to so that Baidu spider can crawl and index your content in a timely manner.
How to Enable Baidu Auto Ping Service?
In order to enable auto ping service your blog should support automatic ping function and you need to configure Baidu’s ping service address to send and receive data from Baidu server. Baidu ping service address is: https://ping.baidu.com/ping/RPC2.
Standard protocol consists of two parts:
- A request sent from your Blog client.
- A response received from the Baidu server.
Auto Ping Request
The ping XML-RPC service client request needs to include the following elements:
RPC Endpoint: http://ping.baidu.com/ping/RPC2
Calling Method: weblogUpdates.extendedPing
Parameters: (shall transmit the same order as listed below)
Blog Name:
Blog Home Address:
Article Address:
Blog RSS Address:
Example Ping XML-RPC Request Packet
POST /ping/RPC2 HTTP/1.0
User-Agent: request
Host: ping.baidu.com
Content-Type: text/xml
Content-Length: 562
<?xml version="1.0" encoding="UTF-8"?><methodCall>
<methodName>weblogUpdates.extendedPing</methodName>
<params>
<param>
<value><string> WebNots Blog </string></value>
</param>
<param>
<value><string>http://blog.webnots.com/</string></value>
</param>
<param>
<value><string>http://blog.webnots.com/blog.html</string></value>
</param>
<param>
<value><string>http://blog.webnots.com/rss</string></value>
</param>
</params>
</methodCall>
Auto Ping Response
XML-RPC response is an http packet in an xml document containing an int value of 0 indicates successful push from the server and 1 indicates a failure. Some of the ping service requests errors codes are as follows:
| Request | Response | HTTP Code |
|---|---|---|
| Non-POST method | HTTP_METHOD_NOT_ALLOWED | Error code 405 |
| Oversized packets | HTTP_REQUEST_ENTITY_TOO_LARGE | Error code 413 |
| Non-“text / xml” request packet | HTTP_UNSUPPORTED_MEDIA_TYPE | Error code 415 |
| Successful Request | HTTP_OK | Success Code 200 |
Successful Server Response Packet
HTTP/1.1 200 OK
Date: Mon, 06 May 2013 10:23:45 GMT
Content-Length: 165
Connection: close
Content-Type: text / xml
<? xml version = "1.0" encoding = "UTF-8"?> <methodResponse>
<params>
<param>
<value>
<int> 0 </ int>
</ value>
</ param>
</ params>
</ methodResponse>
Failed Server Response Packet
HTTP/1.1 200 OK
Date: Mon, 06 May 2013 10:23:45 GMT
Content-Length: 165
Connection: close
Content-Type: text / xml
<? xml version = "1.0" encoding = "UTF-8"?> <methodResponse>
<params>
<param>
<value>
<int> 1 </ int>
</ value>
</ param>
</ params>
</ methodResponse>






Thanks but i am using this code:
(Function () {
var bp = document.createElement (‘script’);
bp.src = ‘//push.zhanzhang.baidu.com/push.js’;
var s = document.getElementsByTagName (“script”) [0];
s.parentNode.insertBefore (bp, s);
}) ();
Is it harmful or useless?