0

I am trying to develop an application using PubSubHubbub in PHP I have successfully subscribed to a RSS using this link but But I don't receive any notification when the source is up can anyone help me with this

the callback script on my server is as follows

<?php    
if (isset($_GET['hub_challenge'])) {
    $xml =  $_GET['hub_challenge'];
}
else {
    $xml=file_get_contents("php://input");

}

$to = "XXXXX";
$subject = "HTML email";



$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";


mail($to,$subject,$xml,$headers);XXXXX
?>
Ironman
  • 173
  • 1
  • 3
  • 10
  • 1
    Is your server accessible from the web? – janih Mar 31 '15 at 18:13
  • you have to print the 'hub_challenge' otherwise the hub will not register your subscriber: http://pubsubhubbub.github.io/PubSubHubbub/pubsubhubbub-core-0.4.html#rfc.section.5.3.1 – Matthias Pfefferle Apr 23 '15 at 14:17
  • 1
    you have print the hub challenge if (isset($_GET['hub_challenge'])) { $xml = $_GET['hub_challenge']; } inside if condtion then only your subscription will be activated http://indiewebcamp.com/How_to_publish_and_consume_PubSubHubbub#The_hub_verifies_the_subscription_request – Sivabalan Jul 16 '15 at 12:47

0 Answers0