Baidu and Google provide the site update automatically submitted interface, interface protocol is based on XML-RPC.
XML-RPC is a Remote Procedure Call (remoteProgramThe Distributed Computing protocol of Remote Procedure Call (RPC) encapsulates call functions using XML and uses http protocol as the transmission mechanism. Functionality is similar to JSON-RPC protocols. The principle is the same, but the data is transmitted in JSON format.
The benefit of using XML-RPC protocols is the ability to automatically notify search engines when the website has content updates, without passively waiting for spider crawling.
Baidu and Google interfaces follow the XML-RPC protocol, the interface names and parameters of different search engines may be slightly different, we can adjust according to the search engine provided by the API.
To implement this function, you need to use an open-source component: cookcomputing. XMLRPC. The component provides all the features of the XML-RPC protocol, including WordPress client support.
Take Google as an example to provideCode:
Using System;
Using Cookcomputing. XMLRPC;
Public Interface Imath: ixmlrpcproxy
{
[Xmlrpcmethod ( " Weblogupdates. Ping " )]
Cookcomputing. XMLRPC. xmlrpcstruct Ping ( String A, String B, String C, String D );
}
Public ClassTest
{
PrivateImath googleproxy = xmlrpcproxygen. Create <imath> ();
Public Void Ping ()
{
Googleproxy. url = " Http://blogsearch.google.com/ping/RPC2 " ;
Googleproxy. Ping ( " Love creating Novels " , " Http://www.aizr.net/ " , " Http://www.aizr.net/Search.aspx? M = 4 & Key = % E6 % 9d % 83% E8 % B4 % A2
" , " HTTP: // Www.aizr.net/rss.aspx ");
}
}
In this way, a simple web site is submitted to the search engine. In fact, the XML-RPC function is far more than these, if you have a unique understanding of the XML-RPC agreement, you are welcome to come and discuss with me. If this article is misleading to you, I am so ashamed of myself.
Recommended: daluo land