Ping: 通知改变的服务

ping 模块有助于将你的站点的改变通知给关注的站点。 它自动发送通知 (称之为 "pings") 到 pingomatic 服务,告诉它你的站点已经改变,而 pingomatic 将轮流 ping 其他服务,例如 weblogs.com、Technorati、blo.gs、BlogRolling、Feedster.com、 Moreover 等等。

ping 模块需要启用 cron 或者类似的时间作业计划。

你可以:

  • 管理 >> 模块 页面启用或禁用 ping 模块。
  • 在你的站点的 cron 页面运行你的 cron job。
  • 阅读 配置 cron jobs 的相关信息。

写一个定制的模块 ping 一系列站点

如果你希望通知的站点没有使用 ping-o-matic,你可以使用下面的更新。

来自: http://drupal.org/node/29704

替换 ping.module:ping_ping 为下面的代码。 兼容 drupal 4.6.3

/**
* 执行 hook_ping().
*
* 通知 pingomatic.com, blo.gs, 和 technorati.com 本站已经改变。
*/
function ping_ping($name = '', $url = '') {
$result = xmlrpc('http://rpc.pingomatic.com', 'weblogUpdates.ping', $name, $url);
if ($result === FALSE) {
watchdog('directory ping', t('Failed to notify pingomatic.com (site).'), WATCHDOG_WARNING);
} else {
watchdog("directory ping", t('successfully notified pingomatic.com (site).'), WATCHDOG_NOTICE);
}
unset($result);
$result = xmlrpc('http://rpc.technorati.com/rpc/ping', 'weblogUpdates.ping', $name, $url);
if ($result === FALSE) {
watchdog('directory ping', t('Failed to notify technorati.com (site).'), WATCHDOG_WARNING);
} else {
watchdog("directory ping",t('successfully notified technorati.com (site).'), WATCHDOG_NOTICE);
}
unset($result);
$result = xmlrpc('http://ping.blo.gs', 'weblogUpdates.ping', $name, $url);
if ($result === FALSE) {
watchdog('directory ping', t('Failed to notify blo.gs (site).'), WATCHDOG_WARNING);
} else {
watchdog("directory ping", t('successfully notified blo.gs (site).'), WATCHDOG_NOTICE);
}
unset($result);
}

- David Herron - http://7gen.com/