pubsubhubbub/subscriber

pubsubhubbub 实现的订阅者。

1.2.0 2024-03-19 22:37 UTC

This package is auto-updated.

Last update: 2024-09-19 23:58:06 UTC


README

这个 PHP 库实现了 PubSubHubbub 的订阅者。

Josh Fraser 编写,并发布在 Apache 2.0 许可证下

安装

更新你的 composer require 块

"require": { "pubsubhubbub/subscriber": "*" }

用法

use \Pubsubhubbub\Subscriber\Subscriber;

$hub_url      = "http://pubsubhubbub.appspot.com";
$callback_url = "put your own endpoint here";

// create a new subscriber
$s = new Subscriber($hub_url, $callback_url);

$feed = "http://feeds.feedburner.com/onlineaspect";

// subscribe to a feed
$s->subscribe($feed);

// unsubscribe from a feed
$s->unsubscribe($feed);