pubsubhubbub / publisher
pubsubhubbub implementation of publisher.
Installs: 130 910
Dependents: 0
Suggesters: 0
Security: 0
Stars: 52
Watchers: 12
Forks: 14
Open Issues: 2
Requires
- php: ~5.4 || ~7.0 || ~8.0
- ext-curl: *
This package is auto-updated.
Last update: 2024-12-07 11:56:36 UTC
README
This PHP library for PubSubHubbub was written by Josh Fraser and is released under the Apache 2.0 License
Install
Update your composer
require block:
"require": { "pubsubhubbub/publisher": "*" }
Usage
use pubsubhubbub\publisher\Publisher; // specify which hub you want to use. In this case we'll use the demo hub on app engine. $hub_url = "http://pubsubhubbub.appspot.com/"; // create a new pubsubhubbub publisher $p = new Publisher($hub_url); // specify the feed that has been updated $topic_url = "http://www.onlineaspect.com"; // notify the hub that the specified topic_url (ATOM feed) has been updated // alternatively, publish_update() also accepts an array of topic urls if ($p->publish_update($topic_url)) { echo "$topic_url was successfully published to $hub_url"; } else { echo "Ooops..."; print_r($p->last_response()); }