I use this code:
<?php
if(isset($_GET["hub_challenge"])) {
echo $_GET["hub_challenge"];
}
else {
}
$ch = curl_init("http://pubsubhubbub.appspot.com");
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch,CURLOPT_POSTFIELDS,"hub.mode=subscribe&hub.verify=sync&hub.callback=http://rssreaderbg.net/pubsubbub/example/index.php&hub.topic=http://rssreaderbg.net/blog/?feed=comments-rss2");
curl_exec($ch);
file_put_contents("logmeme.txt",$HTTP_RAW_POST_DATA);
?><?php
if(isset($_GET["hub_challenge"])) {
echo $_GET["hub_challenge"];
}
else {
}
$ch = curl_init("http://pubsubhubbub.appspot.com");
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch,CURLOPT_POSTFIELDS,"hub.mode=subscribe&hub.verify=sync&hub.callback=http://rssreaderbg.net/pubsubbub/example/index.php&hub.topic=http://rssreaderbg.net/blog/?feed=comments-rss2");
curl_exec($ch);
file_put_contents("logmeme.txt",$HTTP_RAW_POST_DATA);
?>
But the hub at pubsubhubbub.appspot.com gives me "Error trying to confirm subscription" ,why?