首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >获得带卷曲的Feedburner用户

获得带卷曲的Feedburner用户
EN

Stack Overflow用户
提问于 2011-01-16 12:14:34
回答 1查看 382关注 0票数 0

我正在使用FeedBurner感知API。这样的XML数据:

代码语言:javascript
复制
<rsp stat="ok">
−
<!--
This information is part of the FeedBurner Awareness API. If you want to hide this information, you may do so via your FeedBurner Account.
-->
−
<feed id="9n66llmt1frfir51p0oa367ru4" uri="teknoblogo">
<entry date="2011-01-15" circulation="11" hits="18" reach="0"/>
</feed>
</rsp>

我想得到循环数据(11)。我用的是这个代码:

代码语言:javascript
复制
$whaturl="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=teknoblogo";

//Initialize the Curl session
$ch = curl_init();

//Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

//Set the URL
curl_setopt($ch, CURLOPT_URL, $whaturl);

//Execute the fetch
$data = curl_exec($ch);

//Close the connection
curl_close($ch);
$xml = new SimpleXMLElement($data);
$fb = $xml->feed->entry['circulation'];
echo $fb;
echo "OK";

但是,返回的数据是空白的。没有任何错误。只返回OK。我怎么才能解决这个问题?

编辑:回显$data;也返回空白。

EN

回答 1

Stack Overflow用户

发布于 2011-01-16 12:45:46

你试过使用http而不是https吗?

对于这种情况,我认为使用http不会有任何问题。

一些网络主机提供商和一些服务器已经禁用了cURL的SSL。

您可能希望look at this question有关使用cURL + SSL。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4705263

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档