How to read an RSS Feed using PHP

There are many ways 2 read XML Feed using PHP. Some basic ways with which this can be done are given below along with code: Basic Way 1 [php] <?php function getFeed($feed_url) { $content = file_get_contents($feed_url); $x = new SimpleXmlElement($content); echo "<ul>"; foreach($x->channel->item as $entry) { echo "<li><a href=’$entry->link’ title=’$entry->title’>" . $entry->title . "</a></li>"; } … Read more