RSS Feed被切断 [英] RSS Feed getting cut off

查看:87
本文介绍了RSS Feed被切断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将RSS feed引入我的PHP代码中.当我使用Google阅读器查看供稿时,在供稿中看到了几百个项目.但是,当我将其放入代码中时,只会看到10.

I'm trying to pull in an RSS feed into my PHP code. When I view the feed with Google Reader, I see several hundred items in the feed. However, when I pull it into my code, I'm only seeing 10.

造成这种差异的原因是什么?如何获取完整的供稿?

What is the reason for the difference and how can I pull in the full feed?

推荐答案

由于您未显示代码,因此无法确定地说出了什么问题.但是,您已将问题标记为SimplePie问题,并且在某些地方,SimplePie默认为10个项目.因此,这很可能正在发生.

Since you don't show your code, it is impossible to say with certainty what is wrong. However, you tagged your question as a SimplePie question and SimplePie defaults to 10 items in some places. So, that's likely what is happening.

如果您想要更多项目,则需要告诉它显示更多项目.请参阅 Wiki文档的渲染选项"部分.请注意items选项. 要显示的项目数(其余的项目将被隐藏,直到单击更多"为止.默认值为10."

If you want more items, you need to tell it to show more items. See the Render Options section of the wiki documentation. Note the items option. "The number of items to show (the rest are hidden until "More" is clicked). Defaults to 10."

更新:您的评论提醒我,您正在使用Google Reader查看RSS feed中的内容.但是Google阅读器将包含Feed中不再包含的内容.就像Google的Feed API一样,Google阅读器会长时间(可能永远吗?)缓存内容,以便用户可以查看过去黑暗中的条目.但是实际的RSS提要通常不会包含很旧的项目,可能会保持RSS提要的大小合理,以使响应对于处理它的人来说很迅速.

UPDATE: Your comment reminded me that you're using Google Reader to see what is in the RSS feed. But Google Reader will contain things that are no longer in the feed. Like Google's Feed API, Google Reader caches things for a long time (perhaps forever?) so that the user can look at entries from the deep dark past. But the actual RSS feed will not contain very old items typically, possibly to keep the RSS feed size reasonable so that response is snappy for people processing it.

这篇关于RSS Feed被切断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆