Weblogs.Com Perl XML-RPC Ping Utility

I have written a small Perl utility that pings the Weblogs.Com server to notify it of a weblog change. It uses the standard IO::Socket package and therefore should not require the installation of additional packages.

The installation steps and source code are below (open the entry if not visible).

Installation

1. Copy the Perl source code below and save it locally to a file named “weblogUpdatesPing.pl”.
    weblogUpdatesPing.pl source code
2. Edit the file and change the first line to point to the correct location of your Perl executable. For example “#!/usr/bin/perl” on Un*x or “#!c:\perl\bin\perl.exe” on Wintel.
3. Edit the “$weblog_name” and “$weblog_url” strings to contain the name and url of your weblog.

Now, assuming you have a valid Perl installation, you should be able to run the utility:

     perl weblogUpdatesPing.pl

If all goes well you should see a response similar this (wrapped for clarity):

    Pinging rpc.weblogs.com for weblog "Your Weblog Name" at

    "http://Your Weblog Url"

    (0) : Thanks for the ping.

If an error occurs, the return code in the parens will be non-zero and the message will have a description of what possibly went wrong.

Cheers!


2 responses

  1. Hans Avatar

    Fixed the “rcp” to “rpc”. Funny how that went unnoticed for so long!

  2. Chris Schmidt Avatar
    Chris Schmidt

    “print $remote “Host: rcp.weblogs.com$CRLF”;”
    Should be rcp.weblogs.com

Leave a Reply

Your email address will not be published. Required fields are marked *