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