【发布时间】:2010-10-02 18:36:09
【问题描述】:
我想知道如何在 PHP 站点中实现PubSubHubbub。我不明白。你能解释一下吗? 我不明白。 发布者通知订阅者和订阅者 - 我的网站?
<?php
// simple example for the PHP pubsubhubbub Subscriber
// as defined at http://code.google.com/p/pubsubhubbub/
// written by Josh Fraser | joshfraser.com | josh@eventvue.com
// Released under Apache License 2.0
include("PuSHSubscriber.php");
$hub_url = "http://pubsubhubbub.appspot.com";
$callback_url = "url to my site?";
$feed = "feed link";
// create a new subscriber
$s = new Subscriber($hub_url, $callback_url);
// subscribe to a feed
$s->subscribe($feed);
// unsubscribe from a feed
//$s->unsubscribe($feed);
?>
或者我应该在 $hub_url 上发布我的中心?
【问题讨论】: