Hans Kellner Dot Com :: a mighty fine website!

Hans Kellner Dot Com

help help


Please use your head when commenting. I reserve the right to delete anything that I find... well, anything that I want! Har har har I have the power!

Ahhem, ah, and now back to our regular sponsored program.


search search

Google
Web
HansKellner.com

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:

     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!

Posted on November 12, 2001 09:06 PM  

(2) Comments

Permanent link to this comment. On March 15, 2003 03:18 AM, Chris Schmidt wrote:

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

Permanent link to this comment. On March 15, 2003 09:14 AM, Hans wrote:

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

Add Your Own Comment

*
* (not made public)





* Required values to be able to Publish.

Copyright © 1999-2006 Hans Kellner. All rights reserved.