开发者

RSS subscribe/unsubscribe action, query times, and content

Before working on an RSS feed in PHP, I just had a few questions that aren't covered in the basic online guides

  1. When you first subscribe to a feed, is there anything telling the script that this is the first sync? IE a tag开发者_高级运维, a url parameter, or something that conveys to the system that you just subscribed.
  2. Likewise, when you unsubscribe to a feed is there anything telling the script that you just unsubscribed?
  3. How often is a feed usually queried for changes? Every 5 minutes? 10 minutes? 30?
  4. How do you send all of the content? I'm pretty sure its not just one giant file containing everything since the feed was started, but (at least in Google Reader) you see the last 10 or so entries, not everything.

Thanks


  1. No — although you could try to set a cookie. If one isn't in the request then either it is a new subscriber or someone who uses a system that doesn't support cookies (which I suspect would be quite common).
  2. No — although if the client supported cookies you could look to see when a unique id stopped requesting the feed.
  3. Hourly is fairly typical.
  4. Generally speaking, you don't. The typical use case for RSS is to inform people when there is new content, not to distribute the entire archive. You could use the format to distribute an archive, but that would typically be used for a one shot initialization of a system which would then subscribe to the subscription feed to get updates.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜