diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-11-06 12:56:05 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-11-06 12:56:05 +0000 |
commit | 1486dc8f92cc5c84f57465529a3ea1bc39e119c1 (patch) | |
tree | 041dc7c1cd55b427f262474c95d2774897685f9d /modules/ping.module | |
parent | 13f1d2edae13f8f83c9045c840357ed36fbb9eff (diff) | |
download | brdo-1486dc8f92cc5c84f57465529a3ea1bc39e119c1.tar.gz brdo-1486dc8f92cc5c84f57465529a3ea1bc39e119c1.tar.bz2 |
- Make Drupal ping Yahoo.com.
Diffstat (limited to 'modules/ping.module')
-rw-r--r-- | modules/ping.module | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/ping.module b/modules/ping.module index dcd560ea3..09db4f572 100644 --- a/modules/ping.module +++ b/modules/ping.module @@ -107,5 +107,18 @@ function ping_ping($name = '', $url = '') { if (!$result || $result->faultCode()) { watchdog('error', t('Failed to notify technorati.com.')); } + + unset($client); + + $client = new xmlrpc_client('/RPC2', 'api.my.yahoo.com', 80); + + $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($name), new xmlrpcval($feed))); + + $result = $client->send($message); + + if (!$result || $result->faultCode()) { + watchdog('error', t('Failed to notify yahoo.com.')); + } } + ?> |