This tutorial shows how to parse RSS feeds with PHP. From the libraries and methods that I have tested and used SimplePie is by far the best PHP RSS parser. It supports most common RSS modules out of the box.
Get SimplePie library
You can download it from SimplePie download page. Set it up to a folder that you prefer.PHP RSS parser script
This example with comments should explain how to use SimplePie easily enough.Source code viewer
// Load SimplePie library from the same directory. // Initialize SimplePie Class. $simplepie = new SimplePie(); // Give feed url to SimplePie. $simplepie->set_feed_url('http://browse-tutorials.com/rss.xml'); // By default caching feeds is enabled, SimplePie caches the results to cache directory. $simplepie->enable_cache(false); // You can also strip html tags from the feed. $simplepie->strip_htmltags(); // Init initializes the feed download and parsing. $simplepie->init(); // Return right headers for rendering of the page. $simplepie->handle_content_type(); foreach ($simplepie->get_items() as $item) { echo '<div class="items-from-feed">'. '<span class="date">'.$item->get_date('d/m/Y - H:i').'</span>'. '<a href="'.$item->get_permalink().'"><strong>'.$item->get_title().'</strong></a><br /><br />'. $item->get_description(). '</div>'; }Programming Language: PHP