Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3217724
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:26:41+00:00 2026-05-17T15:26:41+00:00

I am wondering how to implement PubSubHubbub in a PHP site.I don’t understand it.Can

  • 0

I am wondering how to implement PubSubHubbub in a PHP site.I don’t understand it.Can you explain me?
I don’t get the idea.
The publisher notifies the subscriber and the subscriber – my site?

    <?php

// simple example for the PHP pubsubhubbub Subscriber
// as defined at http://code.google.com/p/pubsubhubbub/
// written by Josh Fraser | joshfraser.com | josh@eventvue.com
// Released under Apache License 2.0

include("PuSHSubscriber.php");

$hub_url = "http://pubsubhubbub.appspot.com";
$callback_url = "url to my site?";

$feed = "feed link";

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

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

?>

Or on $hub_url I should post my hub?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:26:41+00:00Added an answer on May 17, 2026 at 3:26 pm

    Looks like you’re a subscriber, which means that you want to be notified upon updates in the feed. Here is the process :

    1. Find the hub url. There should be a <link> (or <atom:link>) element in the feed with rel=”hub”. The href contains the url of the hub. There are many different hubs out there!

    2. Implement a callback url. This url (which must be accessible from outside (so, not localhost!) will be called by the hub when new content is available for you. It should also implement the verification mechanism (see below)

    3. Perform the subscription request to the hub : it’s a POST request to the hub url (see 1.) with the following params : hub.topic= hub.callback= hub.mode=subscribe hub.verify=sync (keep sync, as it’s easier to debug).

    4. The hub will send a verification request to your callback, with a hub.verify_token param. Your app must then echo this param for the subscription to be validated.

    5. If all is fine, the hub will return 204 and you’re good to go. If not, it will return a 4XX and you should check the body as it includes indications of what failed.

    6. Later, once the subscriptions is acknowledged, you will get POST requests with the content of the update in the body.

    7. (You have to re-subscribe every day. The actual time depends on what the hub tells you.)

    Looks like you use an existing library. It should implement all the steps from above. Yet, it’s something important to understand what’s going on under the hood, so you may want to implement it yourself. It’s not that complicated. Make sure that your callback is accessible from the “outside” and check that $s->subscribe($feed); doesn’t actually return the outcome of the susbcription as it would help.

    If you need a more complete PubSubHubbub tutorial, check this one.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm wondering how you can implement a program similar to tail -f in C/C++,
I`ve been wondering how to implement methods in a class. Could someone explain me
I'm just wondering how to implement database views in Ruby on Rails. Can you
I was wondering how can I implement a view that allows the user to
I am just wondering how do you implement libmarkdown-php in a php script? By
I'm wondering how to implement what is stated in the title. I've tried something
I was wondering how to implement the debuggger mouse over display functionality, U know
Hey all. I'm wondering how to implement a timeout event in the System.Windows.Forms.Webbrowser control?
I'm wondering how you'd implement the following use-case in REST. Is it even possible
I wondering what the best practice way (in C#) is to implement this xpath

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.