As I've just wrote, pinging is used for announcing other sites over the internet (mainly blog directories, content aggregators and social media sites). XML-RPC is one of the most common methods to acquire this task if you want to create your own scripts or to modify the current existing scripts on your server.
XML-RPC it's a spec and a set of implementations that allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet.
XML-RPC is also a remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned.
There are two ways to ping another site: simple ping (with only the minimum data - the required information about the site), and extended ping (with some additional data). The XML-PRC library designed for php can be downloaded from here: http://sourceforge.net/projects/phpxmlrpc/
XML-RPC Ping:
require('class/lib/xmlrpc.inc');
$client = new xmlrpc_client('http://rpc.pingomatic.com/');
//simple ping ('title','url')
$message = new xmlrpcmsg('weblogUpdates.ping', array(
new xmlrpcval('Optimizing my site'),
new xmlrpcval('http://www.webdesign-software-code-seo.com')
));
$response = $client->send($message);
if($response->faultCode() == '0'){ echo 'it works'; }
Extended XML-RPC Ping:
require('class/lib/xmlrpc.inc');
$client = new xmlrpc_client('http://rpc.pingomatic.com/');
//extended ('title','url','updated_url','rssfeed','keyword1|keyword2|tag')
$message = new xmlrpcmsg('weblogUpdates.extendedPing', array(
new xmlrpcval('Optimizing my site'),
new xmlrpcval('http://www.webdesign-software-code-seo.com'),
new xmlrpcval('http://www.webdesign-software-code-seo.com/very-true/'),
new xmlrpcval('http://feeds.feedburner.com/greentwinkiecom'),
new xmlrpcval('seo|search engine optimization|Optimizing my site')
));
$response = $client->send($message);
if($response->faultCode() == '0'){ echo 'it works'; }
You can found here: http://xmlrpc.scripting.com/ more information about what is XML-RPC is and how to handle the code.
The most important thing that you should know for now is not to abuse of this. If you send too many pings from the same URL or site in a short period of time you may be banned for that URL, or even that specific IP. As I read over the internet some considered (or still consider) XML-RPC pinging as Black Hat SEO because it could be used to get to the first page on the search result for the long-tail words in a very short period of time... but the pings does not count so much in the present time. They are still used with success to promote the sites.