Ping-o-matic and xml-rpc

Saturday 12 June 2004This is over 20 years old. Be careful.

This blog runs on home-grown software, so it usually lags in technology behind the usual blog software. I’ve been pinging weblogs.com and blo.gs for a long time, and figured I could skip the other services because I didn’t want to track down how to do each one.

Today I discovered Ping-o-Matic, which is a meta-pinging service: you ping it, and it pings everyone else. Handy. But it has an XML-RPC interface, and that’s one of the things I had never spent the time to learn how to do. Well, it couldn’t be easier. The Python xmlrpclib module makes the whole thing totally transparent:

import xmlrpclib

remoteServer = xmlrpclib.Server("http://rpc.pingomatic.com/RPC2")
ret = remoteServer.weblogUpdates.ping(
    "Ned Batchelder's blog",
    "http://nedbatchelder.com/blog"
    )
print ret['message']

So now I replaced two HTTP get pings with one XML-RPC ping, and I’m reaching more services. Sweet!

Comments

[gravatar]
Crazy! I searched an XML-RPC and PHP and there are no information. It's not so Handy you say i think! Damn...

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.