FeedBurner vs. SimplePie
…ok, so for a while i was wondering why my website doesnt show my latest blog entries.
I am using SimplePie to fetch the latest RSS feed from FeedBurner and display the last five items. At the beginning i was suspicious of the cache mechanism, but even if i turn off caching completely, it will not fetch the latest feed. So i dugg myself into the internals of SimplePie and it turned out that when it fetches the feed from FeedBurner, it is presented a redirect to http://feedproxy.feedburner.com which indeed does NOT have the latest version. So the problem is not with SimplePie.
Interestingly this redirect doesnt show up when browsing or wgetting the feed.
As soon as i changed the user agent that SimplePie uses, the problem didnt show up any more.
Just add:
$feed->set_useragent(‘gecko’);//anything but simplepie
Later doing some googling revealed this thread and a few others.
This is an archive post. It represents a point of view in the past. Facts might have changed, events might be interpreted differently as of today. Links might be broken.