Ping Yahoo RSS from WordPress and Moveable Type

January 26th, 2004

Jeremy pointed out a method to ping Yahoo RSS crawler for Moveable Type blogs and he did a great job explaining it with pictures. So if you are using MT, check out his entry. I consequently wrote a little pinger for WordPress which does the same thing.

Add this function to your my-hacks.php:
// pings RSS Crawler
function pingYahoo($blog_ID = 1) {
// original function by Dries Buytaert for Drupal
global $blogname,$siteurl,$blogfilename;
if ((!(($blogname==”my weblog”) && ($siteurl==””) && ($blogfilename==”wp.php”))) && (!preg_match(“/localhost\//”,$siteurl))) {
$client = new xmlrpc_client(“/RPC2″, “”, 80);
$message = new xmlrpcmsg(“”, array(new xmlrpcval($blogname), new xmlrpcval($siteurl.”/”.$blogfilename)));
$result = $client->send($message);
if (!$result || $result->faultCode()) {
return false;
return true;
} else {
return false;

Find these lines in your post.php (inside wp-admin folder) :

And add this right after that:

All done and pingin!




  1. Craig (1 comments.) says:

    Worth noting that there’s actually 3 places in post.php which need changing, as well as locations in xmlrpc.php in the root folder, and wp-mail.php. Bit hacky, should really be some global place which says “notify everyone who cares” and then call each of the pingXYZ() functions from there, and everywhere which needs to notify things just calls that one function.

  2. Mark (36 comments.) says:

    You dont really need to change it in all those places, unless you use email blogging frequently. The ping will work fine in one place inside post.php. xmlrpc.php does not exist in 1.0 and above. It has been replaced by class-xmlrpc.php. In addition, no change needs to be made to class-xmlrpc.php. (If I am wrong, please point out for everyone’s benefit)
    To address the notify everyone who cares issue, you could just do as Matt said:

    With 1.01 you could just add:

    add_filter(‘action_publish_post’, ‘pingYahoo’);

    to your my-hacks.php.

  3. bob w (1 comments.) says:

    It may be possible with Moveable Type ,but it is impossible with Typepad. even typepad pro. i asked support and they confirmed it. any chance Yahoo could speak directly to Typepad and get some movement on this issue?


  4. Mark (14 comments.) says:

    You would have to talk with the Yahoo developers to see where that could be headed. I am just a puny student. I really have no experience with Typepad and I would be lying if I told you I knew how to solve the problem.
    However, if you have access to the Typepad source code, I could try to whip something up for you.


  1. […] Yahoo: en 3 sencillos pasos” y luego Mark hizo lo propio con su post llamado ”hacer ping al RSS de Yahoo con WordPress y Mova […]

Obviously Powered by WordPress. © 2003-2013

page counter