Using Magpie RSS

Magpie RSS is an RSS parser available free from SourceForge.

It consists of a handful of scripts which sit on your site and creates a cache file which needs to be chmod’d to 755 or 777 – you may need to use your FTP tool to do that – or Magpie may do it for you.

So, what do you need to do?

  1. Visit the Magpie site and download the latest version of the files.
  2. Unzip the files on your local file system. They come with some examples which may be good to have a play with, but you actually only need to upload these into a “magpie” directory
    • extlib/
  3. Now, decide which page you want to add the feed to and open the appropriate file in your favourite editor (mine is Zend).
  4. Now you just have to add these lines to the file, save and upload!
    [php]define(‘MAGPIE_DIR’, ‘magpie/’);

    $rss = fetch_rss( ‘’ );
    $items = array_slice($rss->items, 0, 5);

    $output = “

    echo ‘



To be completed…


Recent Comments



  1. Hannah
    October 26, 2007

    Think line 11 may be incorrect. Replace it with

    $output .= “{$item[‘title’]}“;

    There was a pair of curly braces missing on one of items. Got it working for me.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.