Skip Site Navigation «

dnews

app«dnews

Web Developer News

Skip Intro...

Using PHP and MagpieRSS to present Dynamic News Feeds

In my ongoing quest to demonstrate how the resources I review using the drx application are both pragmatic and worthwhile, I present RSS News feeds for Web developers from a number of different sources, and in several categories. I tweak this list often, so stay tuned. Suggestions are also welcome.

Although wrapping dnews as an application object took a little work, the engine behind actually fetching the news items is the MagpieRSS PHP feed parser (via Expat). Magpie supports RSS 0.9x, 1.0, 2.0 and most Atom format feeds. Installing and getting it working was incredibly easy. The Magpie library is very simple to use, but be warned of the old adage “garbage in = garbage out,” meaning pick your sources carefully and check them out by hand before plugging the results into your own pages. This is especially important if you are using XHTML like I am, or you can easily break your site.

On the bright side, since the results are cached, once an update is fetched (by anyone, not necessary you), the items are displayed very quickly. Not only does this improve the quality of the user’s experience, it is also good practice in order to avoid hammering your sources with requests.

On an even brighter note, I spent approximately one afternoon implementing this application. In addition to MagpieRSS, Feedview and the RSS Feed Validator were also very useful while developing dnews. Enjoy.

By popular demand, I have published a document which describes how this application was built. Visit the Howto MagpieRSS tutorial for more information.

atom cache magpie parsing php rss xml
 

feediconRSS Channel Selector

  1. delicious
  2. firefox
  3. firefox
  4. furl
  5. blogzero
  6. sitepoint
  7. technorati

Links

Last updated: Sunday, November 30th, 2008 @ 1:04 AM EST [2008-11-30T06:04:07Z]   home

(c) 2008-2010, Douglas W. Clifton, loadaveragezero.com, all rights reserved.