Scripts

Ping your blog via XML-RPC with Perl

May 15th, 2008 at 07:29pm Under PHP+ PHP Tutorial+ Personal Tech+ Programming+ Scripts+ Technology+ Web Design+ Web Pro Business+ Web Tech+ XML Tutorial

The following Perl program connects to several update services to let them know that the your site or blog has been updated. The program uses XML-RPC to call the remote weblogUpdates.ping method of each update service with the name and URL of your site or blog as parameters. You can easily extend the list of update services that are used by the program if required so.
#!/usr/bin/perl
#
# rpcping.pl - Ping your blog with update services
#
# © Copyright, 2006 by John Bokma, http://johnbokma.com/
# License: The Artistic License
#
# Last updated: 2006-12-13 21:12:16 -0600

use strict;
use warnings;

use XMLRPC::Lite;

sub print_usage_and_exit {

print < usage: rpcping.pl "YOUR WEBLOG NAME" URL
USAGE

exit;
}

@ARGV == 2 or print_usage_and_exit;
my ( $blog_name, $blog_url ) = @ARGV;

my @services = (

# See http://codex.wordpress.org/Update_Services for
# a more comprehensive list.
'Google' => ‘http://blogsearch.google.com/ping/RPC2′,
‘Weblogs.com’ => ‘http://rpc.weblogs.com/RPC2′,
‘Feed Burner’ => ‘http://ping.feedburner.com/’,
‘Moreover’ => ‘http://api.moreover.com/RPC2′,
‘Syndic8′ => ‘http://ping.syndic8.com/xmlrpc.php’ ,
‘BlogRolling’ => ‘http://rpc.blogrolling.com/pinger/’,
‘Technorati’ => ‘http://rpc.technorati.com/rpc/ping’ ,
‘BulkFeeds’ => ‘http://bulkfeeds.net/rpc’,
‘BlogFlux’ => ‘http://pinger.blogflux.com/rpc/’,
‘Ping-o-Matic!’ => ‘http://rpc.pingomatic.com/’,
‘NewsGator’ => ‘http://services.newsgator.com/ngws/xmlrpcping.aspx’,
‘Blog People’ => ‘http://www.blogpeople.net/servlet/weblogUpdates’,
‘Howly Cow Dude’ => ‘http://www.holycowdude.com/rpc/ping/’,
‘Blog Update’ => ‘http://blogupdate.org/ping/’,
‘FeedSky’ => ‘http://www.feedsky.com/api/RPC2′,
);

while ( my ( $service_name, $rpc_endpoint ) = splice @services, 0, 2 ) {

my $xmlrpc = XMLRPC::Lite->proxy( $rpc_endpoint );
my $call;
eval {
$call = $xmlrpc->call( ‘weblogUpdates.ping’,
$blog_name, $blog_url );
};
if ( $@ ) {

chomp $@;
warn “Ping ‘$service_name’ failed: ‘$@’\n”;
next;
}

unless ( defined $call ) {

warn “Ping ‘$service_name’ failed for an unknown reason\n”;
next;
}

if ( $call->fault ) {

chomp( my $message = $call->faultstring );
warn “Ping ‘$service_name’ failed: ‘$message’\n”;
next;
}

my $result = $call->result;
if ( $result->{ flerror } ) {

warn “Ping ‘$service_name’ returned the following error: ‘”,
$result->{ message }, “‘\n”;
next;
}

print “Ping ‘$service_name’ returned: ‘$result->{ message }’\n”;
}

Examples of program usage and output:

rpcping.pl "A Perl programmer in Mexico" http://johnbokma.com/mexit/
Ping 'Weblogs.com' returned: 'Thanks for the ping.'
Ping 'Feed Burner' returned: 'Ok'
Ping 'Feedster' returned: 'Thanks for the ping.'
Ping 'Blo.gs' returned the following error: 'Weblog already updated recently.'
Ping 'Syndic8' returned: 'Thanks for pinging Syndic8'
Ping 'BlogRolling' failed: 'Minimum time between pings not reached. Go have a
martini and try again in a bit.'
Ping 'Technorati' returned: 'Thanks for the ping'
Ping 'PubSub.com' returned: 'Ping Received.'

By admin 1 comment

Web Authoring

October 13th, 2007 at 08:21pm Under Scripts

  • Automated Web Publishing Tools
  • CGI Programming Tools
  • HTML and Link Verification Tools
  • HTML Color Pickers
  • HTML Editors A-G
  • HTML Editors H-P
  • HTML Editors Q-Z
  • HTML Index Generators
  • HTML Text Styling Tools
  • HTML to ASCII Converters
  • Image Mapping Tools
  • Java Programming Tools
  • Misc Web Authoring Tools
  • Multimedia Web Authoring Tools
  • Scripting Tools
  • Search Authoring Tools
  • Site Mapping Tools
  • Style Sheets Authoring Tools
  • Web Commerce Building Tools
  • Web Site Promotion Tools
  • By admin Add comment

    Utilities

    October 13th, 2007 at 08:20pm Under Scripts

  • Access Control Utilities
  • Anti-Virus Utilities
  • Automation Utilities
  • Backup and Copy Utilities
  • Clipboard Management Tools
  • Command Shells
  • Compression and Zip File Utilities
  • Disk Analysis Utilities
  • Disk Maintenance and Repair Utilities
  • Explorer Add-ons
  • Explorer Replacements
  • File Cataloging Utilities
  • File Cleanup Utilities
  • File Encryption Utilities
  • File Maintenance and Repair Utilities
  • File Search Utilities
  • File Splitting Utilities
  • File Synchronizing Utilities
  • Misc Encryption Utilities
  • Misc Text Editing Tools
  • Misc Utilities
  • Mouse and Keyboard Utilities
  • Music Utilities
  • Password Management Utilities
  • Patches and Updates
  • PGP Encryption Utilities
  • Required Components
  • Required Files
  • System Analysis Utilities
  • System Maintenance and Repair Utilities
  • Text Editors A-G
  • Text Editors H-P
  • Text Editors Q-Z
  • Text Form Editors
  • Text Search and Replace Tools
  • Text Viewers
  • By admin Add comment

    Themes

    October 13th, 2007 at 08:19pm Under Scripts

  • Animals Themes
  • Anime Themes
  • Cartoon Themes
  • Computer Themes
  • Holiday Themes
  • Misc Themes
  • People Themes
  • Places Themes
  • Religious Themes
  • School Themes
  • Sports Themes
  • Themes Editors and Tools
  • TV Themes
  • Vehicle Themes
  • By admin Add comment

    Shell and Desktop

    October 13th, 2007 at 08:17pm Under Scripts

  • Animal Cursors
  • Animal Screens
  • Animal Screen Savers
  • Animal Wallpaper
  • Anime Cursors
  • Anime Icons
  • Anime Screens
  • Anime Screen Savers
  • Anime Wallpaper
  • Cartoon Cursors
  • Cartoon Icons
  • Cartoon Screens
  • Cartoon Screen Savers
  • Cartoon Wallpaper
  • Computer Cursors
  • Computer Icons
  • Computer Screens
  • Computer Screen Savers
  • Computer Wallpapers
  • Context Menu Enhancements
  • Cursor Editing Tools
  • Desktop Randomizers and Changers
  • Desktop Toolbars and Launchers
  • Desktop Window Managers
  • Font Management Tools
  • Holiday Cursors
  • Holiday Icons
  • Holiday Screens
  • Holiday Screen Savers
  • Holiday Wallpaper
  • Icon Editing Tools
  • Misc Cursors
  • Misc Desktop Management Tools
  • Misc Icons
  • Misc Screens
  • Misc Screen Savers A-G
  • Misc Screen Savers H-P
  • Misc Screen Savers Q-Z
  • Misc Shell Enhancements
  • Misc Wallpaper
  • Movie Cursors
  • Movie Icons
  • Movie Screens
  • Movie Screen Savers
  • Movie Wallpaper
  • MS Power Toys
  • Music Cursors
  • Music Icons
  • Music Screens
  • Music Screen Savers
  • Music Wallpaper
  • People Cursors
  • People Icons
  • People Screens
  • People Screen Savers
  • People Wallpaper
  • Places Cursors
  • Places Icons
  • Places Screens
  • Places Screen Savers
  • Places Wallpaper
  • Quick Shutdown Tools
  • Religious Cursors
  • Religious Icons
  • Religious Screens
  • Religious Screen Savers
  • Religious Wallpapers
  • School Cursors
  • School Icons
  • School Screens
  • School Screen Savers
  • School Wallpaper
  • Screen Saver Hotspot Tools
  • Screen Saver Tools
  • Shell Command Line Tools
  • Shell Customization Managers
  • Sports Cursors
  • Sports Icons
  • Sports Screens
  • Sports Screen Savers
  • Sports Wallpaper
  • Startup Shutdown Screen Tools
  • Start Menu Utilities
  • System Tray Enhancers
  • System Tray Toolbars and Launchers
  • TV Cursors
  • TV Icons
  • TV Screens
  • TV Screen Savers
  • TV Wallpaper
  • Vehicle Cursors
  • Vehicle Icons
  • Vehicle Screens
  • Vehicle Screen Savers
  • Vehicle Wallpaper
  • Video Game Cursors
  • Video Game Icons
  • Video Game Screens
  • Video Game Screen Savers
  • Video Game Wallpaper
  • Virtual Desktop Managers
  • Wallpaper Tools
  • By admin Add comment

    Programming

    October 13th, 2007 at 08:15pm Under Scripts

  • ActiveX
  • Components and Libraries
  • C and C++ Tools and Components
  • C and C Tools and Components
  • Databases and Networks
  • Delphi Tools and Components
  • Editors
  • Help File Tools
  • IDEs and Coding Utilities
  • Java
  • JavaScript
  • Misc Programming Tools
  • PowerBuilder Tools and Components
  • Registration Tools
  • Setup Utilities
  • Visual Basic Components A-G
  • Visual Basic Components H-P
  • Visual Basic Components Q-Z
  • Visual Basic Tools
  • By admin Add comment

    Palm Pilot

    October 13th, 2007 at 08:14pm Under Scripts

    By admin Add comment

    Previous Posts


    Free Downloads City
    Free Downloads

    Categories

    Recent Blog Posts

    Blogroll

    Posts by Month