README.txt 745 B

123456789101112131415161718192021
  1. This PHP library for PubSubHubbub was written by Josh Fraser (joshfraser.com) and is released under the Apache 2.0 License
  2. Usage:
  3. // specify which hub you want to use. in this case we'll use the demo hub on app engine.
  4. $hub_url = "http://pubsubhubbub.appspot.com/";
  5. // create a new pubsubhubbub publisher
  6. $p = new Publisher($hub_url);
  7. // specify the feed that has been updated
  8. $topic_url = "http://www.onlineaspect.com";
  9. // notify the hub that the specified topic_url (ATOM feed) has been updated
  10. // alternatively, publish_update() also accepts an array of topic urls
  11. if ($p->publish_update($topic_url)) {
  12.     echo "$topic_url was successfully published to $hub_url";
  13. } else {
  14.     echo "Ooops...";
  15.     print_r($p->last_response());
  16. }