How to test XML-RPC pings

He Loves XML
Image: Attribution-NonCommercial License by Will Pate

There’s no point blogging if people can’t find your blog. With a little help from pingomatic you can tell the whole world that you’ve just updated your blog. This means you’ll get more visitors to your blog (at least in theory!). Taking full advantage of these update services is easy. If you’re using wordpress, take a look at this. Chances are that your blog is already pinging the necessary update services and there’s absolutely nothing you have to do. If however, your site is not listed in Google’s Blog Search and other services, then the best thing you can do is sit back and wait. It probably will eventually appear in search results.

If you’re impatient like me, you might want to test to see if your blog is sending a valid xml-rpc ping. Some ISP’s might block XML-RPC pings, your server might not have xml-rpc enabled and so on. It can be a little tricky to see if your blog is sending a proper ping. One method is to ping weblogs.com (rpc.weblogs.com), download the recent changes file and grep through it for your blog’s url. If your blog is in that file, then everything works fine. If not, you’ll never know what went wrong…

Therefore, just to be 100% certain that my blog is sending a valid ping request, I wrote a small php script and saved it on another server somewhere on the other side of the planet:

<?php
$filename = 'pinglog.txt';
$ip = $_SERVER["REMOTE_ADDR"];
$raw = $HTTP_RAW_POST_DATA;
$rm = $_SERVER["REQUEST_METHOD"];
$handle = fopen($filename, ‘a’);
fwrite($handle, $ip.”\n”.$raw.”\n”.$rm);
fclose($handle);
?>

I then set this server’s address as the ping address, wrote a small test post on my blog and published it. Oh behold, I get the following log entry on the far away server:

81.90.65.72
<?xml version="1.0"?>
<methodCall>
<methodName>weblogUpdates.ping</methodName>
<params>
<param><value><string>wstryder.org</string>
</value></param>
<param><value><string>http://wstryder.org/</string>
</value></param>
</params></methodCall>
POST

Beautiful, valid XML! I now know that my blog does send a valid ping, so if my blog posts don’t show up in blog search results then the problem is at the other end. Once again, the smartest thing to do is to just wait patiently, your blog will eventually be listed… someday. Maybe.

0 Responses to “How to test XML-RPC pings”


  1. No Comments

Leave a Reply