如果你希望通知的站点没有使用 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/
----------------------------------
1、原文: Write a custom module to ping a set of sites
2、Ping: notify services of changes(1)
最新评论
7 分钟 25 秒 前
57 分钟 1 秒 前
57 分钟 22 秒 前
1 小时 27 分钟 前
2 小时 55 分钟 前
2 小时 57 分钟 前
3 小时 1 分钟 前
3 小时 2 分钟 前
3 小时 12 分钟 前
4 小时 16 分钟 前