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

The following code will display two feeds on the same page with the same formatting. Notice how you only need to "require_once" once. Also notice that CaRP will display up to five items from each feed, not a total of five:

<?php
require_once "/path/to/carp.php";
CarpConf('preitem','&bull; ');
CarpConf('maxitems',5);
CarpConf('poweredby','');
CarpShow("http://nwt.mouken.com/rss/headlines.rdf", "nwt.example.multiple.a");
CarpShow("http://antone.mouken.com/dreams/rss/antone.talk.1.rdf", "dreams.example.multiple.a");
?>

The following code will display two feeds on the same page. The first will have a bullet before each item. The second has all of its settings reset to the defaults by calling the function CarpConfReset(), and then the maximum number of items to display set to 5. In such a simple example, you would usually just add a line like "CarpConf('preitem',"");" to reset the one configuration setting that had been overridden, but CarpConfReset() can be useful when you've overridden a number of options for one feed and then wish to display another feed with significantly different formatting.

Note that it is a good idea to set up background refreshing when accessing many newsfeeds from the same page:

<?php
require_once "/path/to/carp.php";
CarpConf('preitem','&bull; ');
CarpConf('poweredby','');
CarpShow("http://nwt.mouken.com/rss/headlines.rdf", "nwt.example.multiple.b");
CarpConfReset();
CarpConf('poweredby','');
CarpConf('maxitems',5);
CarpShow("http://antone.mouken.com/dreams/rss/antone.talk.1.rdf", "dreams.example.multiple.b");
?>
Example Output:

Two with the same formatting:
In Control Of Your Enviroment
Hanging with Ozzy
Saddam the Red and the Essenes
Basketball with Alan Alda
Sing it: "Why is everything so lame?"

Two with different formatting:
In Control Of Your Enviroment
Hanging with Ozzy
Saddam the Red and the Essenes
Basketball with Alan Alda
Sing it: "Why is everything so lame?"


"I wanna ride the pony!"
Chess players on the web have a free place to play at Chess Hounds. Here you play in your web browser, not some proprietary chess program, so firewalls don't get in the way like they do with most proprietary systems. Come ride the pony!