从 rss feed 读取 feed burner
我正在阅读 rss feed
$homepage = file_get_contents('http://feeds.cbsnews.com/CBSNewsWorld');
$movies = new SimpleXMLElement($homepage);
,发现这样的数据,
[item] => Array
(
[0] => SimpleXMLElement Object
(
[title] => Japan grants stricken nuke co. $11B for cleanup
[description] => Cash-strapped
....and more
)
我的问题是,当我看到此 URL 的页面源时,我发现了一个附加字段
<feedburner:origLink>http://www.cbsnews.com/8301-202_162-57318337/girl-3-eats-leftovers-for-2-days-after-mom-dies/</feedburner:origLink>
,但我无法在此数组中看到此字段,并且我想将此字段存储在我的数据库。请建议...
I'm reading a rss feed from
$homepage = file_get_contents('http://feeds.cbsnews.com/CBSNewsWorld');
$movies = new SimpleXMLElement($homepage);
and I found data like this
[item] => Array
(
[0] => SimpleXMLElement Object
(
[title] => Japan grants stricken nuke co. $11B for cleanup
[description] => Cash-strapped
....and more
)
my problem is when I see the page source of this URL I found a addition field
<feedburner:origLink>http://www.cbsnews.com/8301-202_162-57318337/girl-3-eats-leftovers-for-2-days-after-mom-dies/</feedburner:origLink>
but I cant see this field in this array, and I want to store this field in my database. please suggest...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现了同样的问题。我所做的是修改所有 RSS 文件,效果很好(我每天都会访问数千个提要)。在您的情况下:
现在 feedburner:origLink 是 feedburnerorigLink
I found the same problem. What I did is modify all RSS file and it works great (I access to thousands of feeds every day). In your case:
Now feedburner:origLink is feedburnerorigLink