php
Enclosure Support for lastRSS
A brief search for a lightweight RSS parser for PHP led me to lastRSS. It supports caching and character encoding -- major plusses for the project I was working on. Unfortunately, lastRSS lacks decent support for enclosures, which was a show stopper for me. I also considered MagpieRSS, which I've heard good things about, but development on the 2.0 version (which purports to support RSS enclosures) seems to have stalled -- the developer hasn't posted an update since last Fall, and the link to the development version was broken.
lastRSS is a pretty clean chunk of code, and extending it to provide support for XML attributes (in turn, supporting the enclosure element) seemed like the simplest option.
Note that this modified version of the code will return an array of attributes, for RSS elements that contain them. If the element also has content, this will be stored in an array element named value.
- Read the full story...
- 1155 reads
- (8 comments)

