简体   繁体   中英

Pubsubhubbub and non-unique callback

让我们假设,如果两个或两个以上的博客同时更新其rss提要,并且回调不是唯一的,那么是否有可能“混淆”回调脚本,从而将RSS-s与simpleXML进行解析?

Well, if the callback doesn't allow you to identify clearly the feed concerned with the update, you will have to parse the content, and try to identify what feed is concerned based on the links in the header part of the feed. (not in entries). It's not as easy as it seems, because a lot of feeds may have different URLs, with tracking codes, different cases... etc.

Generally, it is good practice to use distinct callback URLs for each of the subscriptions. If you use a callback that contains the feed url or some kind of unique id that you use internally, you don't need to parse the content to know that a notification is about a given feed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM