|
RSS The way we gather information on the Internet is constantly changing. While web site syndication is nothing new, RSS has become a very popular acronym over the last couple years. Using RSS readers to aggregate user-specific, relevent web content not only makes it easier to get what we want from the Internet, it also decreases wasted bandwidth. Advertisers are probably not terribly fond of this practice, because it can reduce the amount of annoying popups and banners we're forced to endure. RSS can also make it more difficult for web trending companies to analyze your browsing habits, because they can't set cookies on your browser until you actually go to their sites. Forgive me for not seeing that as a downside of syndication.
Limitations There are a lot of tools readily available all over the Internet that can read RSS feeds. Many, if not most of them, rely on remote url file access. This option is called allow url fopen, here is a description at php.net: allow_url_fopen
In the pursuit of greater security many webhosts, mine included, are disabling url fopen on their servers. At least with Dreamhost, you can bring up your own installation of PHP if it's really that critical. Personally, I feel that the opinion of my service provider is probably based on credible logic though. Instead of circumventing their safety measures, I just chose to work with them. You simply have to use curl instead of fopen.
You may not be able to tell when url fopen has been disabled by your host, because sometimes error messages are suppressed as another precaution. One tipoff without any error messages, is the simple fact that your RSS feeds don't work. When enabled, the typical error message reads like this: "URL file-access is disabled in the server configuration..."
Workaround This script currently supports some of the key RSS version 1.0 and 2.0 tags. The exercise was initally aimed at supporting curl in favor of fopen. Now that I have a successful proof of concept, I will start to support some other common tags. Take a look at the first couple functions to get an idea of what I am talking about. In order to use this script, just grab a copy of it and swap out the value in "$RSSurl" with the url of your feed. Please feel free to post any feedback or suggestions for improving this script.
Download Code RSS Script Download Page |