From f763bb731ea9fe4f6f4d0ebfb9e86cd2a183dbd6 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 27 Dec 2004 12:27:02 +0000 Subject: - Made the ping module ping pingomatic.com, which in turn, will ping all the major ping services. Less code to ping more services. --- modules/ping.module | 68 ++++-------------------------------------------- modules/ping/ping.module | 68 ++++-------------------------------------------- 2 files changed, 10 insertions(+), 126 deletions(-) (limited to 'modules') diff --git a/modules/ping.module b/modules/ping.module index 14310fdc3..eaa74d230 100644 --- a/modules/ping.module +++ b/modules/ping.module @@ -13,15 +13,8 @@ function ping_help($section) { switch ($section) { case 'admin/help#ping': $output .= t(" -

Drupal can automatically send notifications (called \"pings\") to the following sites to tell them that your site has changed. To do so, Drupal implements the %weblogs-XML.

- -

The ping feature requires crontab.

", array('%weblogs' => 'Weblogs.com', '%weblogs-XML' => ''. t('XML-RPC interface of weblogs.com') .'', '%weblogs-RSS' => ''. t('Weblogs.Com for RSS') .'', '%weblogs-RSS-changes' => ''. t('the weblogs.com for RSS') .'', '%blo-gs' => 'blo.gs','%blogtracker' => 'blogtracker', '%blogrolling' => 'blogrolling.com', '%blo-gs-XML' => ''. t('XML-RPC interface of blo.gs').'', '%technorati' => ''. t("Technorati"). '', '%yahoo' => 'My Yahoo!')); +

Drupal can automatically send notifications (called \"pings\") to the %pingomatic to tell them that your site has changed. In turn pingomatic.com will ping other services like weblogs.com, Technorati, blo.gs, BlogRolling, Feedster.com, Moreover, etc.

+

The ping feature requires crontab.

", array('%pingomatic' => '')); break; case 'admin/modules#description': @@ -60,68 +53,17 @@ function _ping_notify($name, $url) { /** * Implementation of hook_ping(). * - * Notifies weblogs.com, blo.gs, and technorati.com of changes at this site. + * Notifies pingomatic.com, blo.gs, and technorati.com of changes at this site. */ function ping_ping($name = '', $url = '') { $feed = url('node/feed', NULL, NULL, TRUE); - - $client = new xmlrpc_client('/RPC2', 'rpc.weblogs.com', 80); - - $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($name), new xmlrpcval($url))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify weblogs.com (site).')); - } - - unset($client); - - $client = new xmlrpc_client('/RPC2', 'rssrpc.weblogs.com', 80); - - $message = new xmlrpcmsg('rssUpdate', array(new xmlrpcval($name), new xmlrpcval($feed))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify weblogs.com (RSS).')); - } - - unset($client); - - $client = new xmlrpc_client('/', 'ping.blo.gs', 80); - - $message = new xmlrpcmsg('weblogUpdates.extendedPing', array(new xmlrpcval($name), new xmlrpcval($url), new xmlrpcval($url), new xmlrpcval($feed))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify blo.gs.')); - } - - unset($client); - - $client = new xmlrpc_client('/rpc/ping', 'rpc.technorati.com', 80); - + $client = new xmlrpc_client('/', 'rpc.pingomatic.com', 80); $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($name), new xmlrpcval($url))); - - $result = $client->send($message); - - 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.')); + watchdog('error', t('Failed to notify pingomatic.com (site).')); } } diff --git a/modules/ping/ping.module b/modules/ping/ping.module index 14310fdc3..eaa74d230 100644 --- a/modules/ping/ping.module +++ b/modules/ping/ping.module @@ -13,15 +13,8 @@ function ping_help($section) { switch ($section) { case 'admin/help#ping': $output .= t(" -

Drupal can automatically send notifications (called \"pings\") to the following sites to tell them that your site has changed. To do so, Drupal implements the %weblogs-XML.

- -

The ping feature requires crontab.

", array('%weblogs' => '
Weblogs.com', '%weblogs-XML' => ''. t('XML-RPC interface of weblogs.com') .'', '%weblogs-RSS' => ''. t('Weblogs.Com for RSS') .'', '%weblogs-RSS-changes' => ''. t('the weblogs.com for RSS') .'', '%blo-gs' => 'blo.gs','%blogtracker' => 'blogtracker', '%blogrolling' => 'blogrolling.com', '%blo-gs-XML' => ''. t('XML-RPC interface of blo.gs').'', '%technorati' => ''. t("Technorati"). '', '%yahoo' => 'My Yahoo!')); +

Drupal can automatically send notifications (called \"pings\") to the %pingomatic to tell them that your site has changed. In turn pingomatic.com will ping other services like weblogs.com, Technorati, blo.gs, BlogRolling, Feedster.com, Moreover, etc.

+

The ping feature requires crontab.

", array('%pingomatic' => '')); break; case 'admin/modules#description': @@ -60,68 +53,17 @@ function _ping_notify($name, $url) { /** * Implementation of hook_ping(). * - * Notifies weblogs.com, blo.gs, and technorati.com of changes at this site. + * Notifies pingomatic.com, blo.gs, and technorati.com of changes at this site. */ function ping_ping($name = '', $url = '') { $feed = url('node/feed', NULL, NULL, TRUE); - - $client = new xmlrpc_client('/RPC2', 'rpc.weblogs.com', 80); - - $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($name), new xmlrpcval($url))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify weblogs.com (site).')); - } - - unset($client); - - $client = new xmlrpc_client('/RPC2', 'rssrpc.weblogs.com', 80); - - $message = new xmlrpcmsg('rssUpdate', array(new xmlrpcval($name), new xmlrpcval($feed))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify weblogs.com (RSS).')); - } - - unset($client); - - $client = new xmlrpc_client('/', 'ping.blo.gs', 80); - - $message = new xmlrpcmsg('weblogUpdates.extendedPing', array(new xmlrpcval($name), new xmlrpcval($url), new xmlrpcval($url), new xmlrpcval($feed))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify blo.gs.')); - } - - unset($client); - - $client = new xmlrpc_client('/rpc/ping', 'rpc.technorati.com', 80); - + $client = new xmlrpc_client('/', 'rpc.pingomatic.com', 80); $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($name), new xmlrpcval($url))); - - $result = $client->send($message); - - 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.')); + watchdog('error', t('Failed to notify pingomatic.com (site).')); } } -- cgit v1.2.3