Search Flex Components Free

Custom Search

December 10, 2007

Flash Rss Reader using PHP with XML and MySQL

What’s RSS?
Rich Site Summary (RSS) is a lightweight XML vocabulary for describing metadata about Web sites, ideal for news syndication. Originally developed to populate Netscape's My Netscape portal with external newsfeeds ("channels") RSS has taken on a life of its own and has become perhaps the most popular XML format today. Thousands of Web sites today use RSS as a "what's new" mechanism to drive traffic their way. There are distinct versions of RSS specifications, the most important: RSS 0.91, 0.92 and 1.0. The principal difference between versions if the use of tags, each version adding more tags and information about the feeds. To see a complete article about creation and evolution of RSS feeds, see http://www.webreference.com/authoring/languages/xml/rss/1/

Rss Reader
This thin Flash Client is intended to read RSS (Rich Site Summary) 0.91, 0.92 and 1.0 Feeds in his most important tags through a PHP class who parses the XML data and outputs name/pair values who can be interpreted by the Flash movie. In great part, this work is possible thanks to erational.org, who has developped some great reader that doesn’t fill my needs. My problem was that I need a Pocket PC Reader (who only has Flash 5 Player or maybe when you’re reading this, Flash 6 player has released on PPC) so I developped the XML parser in PHP using the PHP SAX parser (included in standard distribution). The pocketRFlash.php (in PocketReader) and the Rss.php (in the Reader) handles the XML output to build the string flow. The xmlclass.php is the base class for both. All the XML parse routine is done in PHP, so Flash only need to read name/pair values, giving a less processor intensive movie, welcome especially when you're targeting a wide audience.

Also I included some management tool fot those using the database version (MySQL) with a setup and basic insert/delete forms to manage the categories and the feeds. The provided feeds are only for demostration purpose, you want to replace with your owns. The Pocket Reader was developped in Flash 5 and the code is not so clean as I want (anyway, who can write clean code in Flash 5 ActionScript? … well, don’t answer me) The Main Reader was developped for Flash Player 6.



Questions? Visit us on the message board.

Related Flex Tutorials