Pubsubhubbub hub.verify 是同步的。但它说我“尝试确认订阅时出错”。这是我的订阅代码:
<?php
if(isset($_GET["hub_challenge"])) {
exit($_GET["hub_challenge"]);;
}
$feeded = $_POST['feed'];
$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/cssexam/index1.php?url=$feeded&hub.topic=$feeded");
curl_exec($ch);
$conn = mysql_connect("localhost","rssreade_rss","siatsowi");
mysql_select_db("rssreade_rss");
?>
和我的回调代码:
if(isset($_GET["hub_challenge"])) {
file_put_contents("logmeme1.txt",$HTTP_RAW_POST_DATA,FILE_APPEND);
exit($_GET["hub_challenge"]);
}
我的错误在哪里?