Search code examples
phpwebsub

Pubsubhubbub and non-unique callback


Let's assume that if two or more blogs are updating their rss feeds at the same time and the callback isn't unique is there a chance to "confuse" the callback script ,parsing the RSS-s with simpleXML ?


Solution

  • 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.