Skip to content

pfefferle/php-pubsubhubbub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Publisher

A simple "publisher" demo:

include("publisher.php");

$hub_url = "http://pubsubhubbub.appspot.com";
$topic_url = "http://notizblog.org/feed/";
    
$p = new PshbPublisher($hub_url);
if ($p->publish_update($topic_url)) {
  echo "$topic_url was successfully published to $hub_url";
} else {
  echo "ooops...";
  print_r($p->last_response());
}

Subscriber

A simple "subscriber" demo:

include("subscriber.php");

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

$feed = "http://notizblog.org/feed/";

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

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

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

About

a simple PHP client library for pubsubhubbub, based on the work of Josh Fraser

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages