Skip to content

Instantly share code, notes, and snippets.

@tsudot
Created March 31, 2010 19:30
Show Gist options
  • Save tsudot/350763 to your computer and use it in GitHub Desktop.
Save tsudot/350763 to your computer and use it in GitHub Desktop.
<?php
class pubsubhubbub{
var $callback_url; //the url we need to post the updates to
var $title; //the title of the url
var $created_time; //time is was created
var $subscription_state;//the state of the subscription (pending for confirmation/ verified)
function __construct() //we accept the above parameters and save it in the db.
function confirm_subscription() //we verify the subscription and update the subscription_state value.
function publish_feed() //as soon as a new entry is posted, this function will get called and it will post
// the feed_id along with the url to the subscribers callback_url.
function send_request() //send a request to a hub we need to subscribe to. Here we send our hub url as the
//callback_url
function get_feeds() //we get the feeds of the hub we have subscribed to, we parse the contents
//here and send it for displaying.
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment