Adding an RSS Feed with PHP

I have a marketing web site at and when I updated from PHP 4 to 5 my RSS feed reader stopped working. So I browsed for a simple replacement that worked well with PHP 5 and found something called MagpieRSS at SourceForge that worked wonderful.

Here’s the simple PHP code that I needed to insert on my page where I wanted the RSS feed to appear:

$rss = fetch_rss(‘’);
foreach ($rss->items as $item ) {
$title = $item[title];
$url = $item[link];
$description = $item[description];
echo “<a href=$url>$title</a></li><br>$description<br>”;

<br />

Here’s what this feed outputs on my page:

Leave a Reply