Note: CogDogBlog has a new WordPress powered home at http://cogdogblog.com/. All entries from this version have been moved there, so as a guide dog service try finding this article in its new home by title search.
In response to observed, unexpected behavior, I made a minor tweak to our PHP script that does the RSS to JS magic, using JavaScript to embed RSS content in any page.
The probllem was on the simple way I was naming my cache files (the RSS parser I use creates cache files to ease the load on your server)- previously it based the cache file on just the path and file name of the RSS feed, so in some cases people were getting feeds from other sites (bad).
Now cache files are based on the entire URL, as to make them unique. The change would not likely affect someone running our PHP script to generate feeds from their own sites- it is more of a problem like ours, where when I cleaned the cache directory, I saw nearly 500 cache files.
Your mileage may vary.
blogged October 13, 2003 09:04 AM :: category [ rss ]Hello,
Nice script. It works beautifully. However, i'm using RSSv2.0 and im having problems adjusting the code from $dc_date to use . Is there any chance you can improve compatibility issues? At the moment its not parsing the date correctly and showing 1970 as the date.
Thank you, keep up the great work.
Commented by: ALIEN on October 13, 2003 07:29 PMAlan, I was emailing this link to a fella and noticed the update. Thanks!
We need an email list to be notifed of updates! :)
You've created a monster!
Thanks again
Richard
Commented by: Richard on October 14, 2003 11:22 AMAlan, back again, updated scripts work great,
FYI:
"rss2js.php script" has been updated but the "Version History" hadn't ... confusing
Also, as to the date comment above, I'm using V2.0 also and the justed tested, the date comes thru fine. I wonder if his feed validates?
Thanks again
Peace
Richard
Commented by: Richard on October 14, 2003 12:08 PM"Alien" was correct, my code was not properly handling the RSS 2.0 feeds, but I just posted a fix:
http://cogdogblog.com/alan/archives/000241.html
or test it at:
http://jade.mcli.dist.maricopa.edu/feed/
The problem was the code looking at itme tags was not lookign for pubDate (now it does)- and as I discovered, it would not get the URLs linked because it was not looking for the <guid> tags.
Richard,
I have seen a few MovableType feeds billed as RSS 2.0 but they actually are not using pubDate.
Commented by: Alan Levine on October 14, 2003 04:37 PMPS for Richard-
No emails for updates, but you can tune your RSS reader to:
http://cogdogblog.com/alan/cat_rss.rdf
Commented by: Alan Levine on October 14, 2003 04:38 PM