Ping mechanism is used to solve the problem that original articles are preferentially indexed by High-weight websites

Source: Internet
Author: User
What is Ping service?

Ping is an update Notification Service Based on the xml_rpc standard protocol. It is used by a blog to quickly notify Baidu of content updates, so that Baidu can capture and update content in a timely manner.

Ping Service Usage

You can use the ping service either by means of manual notification or automatic notification:
Manual Ping: Access Logging.
Automatic Ping: If your blogProgramSupports automatic ping. You only need to configure Baidu's ping service address to your blog publishing background or client program to implement the automatic notification function. Baidu Ping service address: http://ping.baidu.com/ping/RPC2

Xml_rpc for automatic Ping

XML-RPC customer requests sent to Baidu Ping services must contain the following elements:
RPC endpoint: http://ping.baidu.com/ping/RPC2
Call Method Name: weblogupdates. extendedping
Parameters: (transmitted in the same order as listed below)
Blog name
Blog Homepage Address
New hairArticleAddress
Blog RSS address

Example of a ping Request Packet

Weblogupdates. extendedping XML-RPC Request example:

Post/ping/rpc2 HTTP/1.0user-AGENT: requesthost: Ping. Baidu. comcontent-type: text/xmlcontent-length: 511 <? XML version = "1.0" encoding = "UTF-8"?> <Methodcall> <methodname> weblogupdates. extendedping </methodname> <Params> <param> <value> <string> Baidu space </string> </value> </param> <value> <string> http://hi.baidu.com/baidu/ </string> </value> </param> <value> <string> http://baidu.com/blog/example.html </string> </value> </param> <value> <string> http://hi.baidu.com/baidu/rss </string> </value> </param> </Params> </methodcall>

Example of Ping-service response:

Ping-service returns the http_method_not_allowed (405) Error for a non-post Method RequestCode
Return the http_request_entity_too_large (413) error code for the oversized error package.
Return the http_unsupported_media_type (415) error code for a non-"text/XML" Request Packet
In other cases, return the http_ OK (200) code.
The XML-RPC response http package contains an XML document with an int value. 0 indicates that the push is successful, and other values indicate that the push fails. Currently, only 0 and 1 are supported.

When the push is successful, the server response package is:

 
HTTP/1.1 200 okdate: Mon, 11 May 2009 11:54:53 gmtcontent-length: 156 connection: closecontent-type: text/XML <? XML version = "1.0" encoding = "UTF-8"?> <Methodresponse> <Params> <param> <value> <int> 0 </int> </value> </param> </Params> </methodresponse>

When the push fails, the server response package is:

 HTTP/1.1 200 okdate: Mon, 11 May 2009 11:54:53 gmtcontent-length: 156 connection: closecontent-type: text/XML 
   
   
    
     
     
     
       1 
      
      
    
   

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.