CaRP: Caching RSS Parser - Manual
     Version 2.7.5 (8/13/2003)

NOTE: This version of CaRP is obsolete. This documentation is being left here for those who have not yet upgraded to the current version.

Download | Installation | Configuration | Functions | Examples | Donations

Examples:
Styles & Classes | Multiple Feeds on a Page | Unordered List | Background Refreshing | Filtering | Aggregating 1 | Aggregating 2 | JavaScript

This code will select items containing any of the words "Microsoft", "Oracle", "Sun", or "IBM" in either the title or description from two different newsfeeds, and display the four most recent. Note that the newsfeeds must contain either a pubDate or dc:date field for their items in order to correctly select the most recent stories:

<?php
require_once "/path/to/carp.php";
CarpConf('preitem','&bull ');
CarpConf('filterin','microsoft|oracle|sun|ibm');
CarpConf('showdesc',1);
CarpConf('maxitems',4);
CarpConf('maxdesc',100);
CarpConf('cacheinterval',120);
CarpFilter("http://trainedmonkey.com/news/rss.php?s=31", "trainedmonkey31.example.ms.dated");
CarpFilter("http://trainedmonkey.com/news/rss.php?s=30", "trainedmonkey30.example.ms.dated");
CarpAggregate('trainedmonkey31.example.ms.dated|trainedmonkey30.example.ms.dated'); ?>
Example Output: