CaRP: Caching RSS Parser - Manual
     Version 3.5.4 (10/7/2004)

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 | Upgrading from version 2 | Functions | Examples | Donations

Old documentation: Version 2

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

This code will only display items containing at least one of the words "fly", "buffalo" and "samurai" in the title or description:

<?php
require_once "/path/to/carp.php";

// display a bullet before each item
CarpConf('bi','&bull; ');

// set up filtering
CarpConf('filterin','fly|buffalo|samurai');

// show up to 3 items
CarpConf('maxitems',3);

// show up to 100 characters of the description
CarpConf('maxidesc',100);

// show the newsfeed
CarpCacheShow('http://antone.mouken.com/dreams/rss/antone.talk.1.rdf');
?>


This code will only display items not containing any of the words "fly", "buffalo" or "samurai" in the title or description:

<?php
require_once "/path/to/carp.php";
CarpConf('bi','&bull; ');
CarpConf('filterout','fly|buffalo|samurai');
CarpConf('maxitems',3);
CarpConf('maxidesc',100);
CarpShow("http://antone.mouken.com/dreams/rss/antone.talk.1.rdf", "dreams.example.filter.b");
?>


This code will display items containing "fly", "buffalo" or "samurai", but not "rope" in the title or description:

<?php
require_once "/path/to/carp.php";
CarpConf('bi','&bull; ');
CarpConf('filterin','fly|buffalo|samurai');
CarpConf('filterout','rope');
CarpConf('maxitems',3);
CarpConf('maxidesc',100);
CarpShow("http://antone.mouken.com/dreams/rss/antone.talk.1.rdf", "dreams.example.filter.c");
?>


This code will display items containing the word "fly" in the title, or "family" in the description, but not "extended" in either the title or description:

<?php
require_once "/path/to/carp.php";
CarpConf('bi','&bull; ');
CarpConf('filterin','title:fly|description:family');
CarpConf('filterout','extended');
CarpConf('maxitems',3);
CarpConf('maxidesc',100);
CarpShow("http://antone.mouken.com/dreams/rss/antone.talk.1.rdf", "dreams.example.filter.d");
?>
Example Output:

fly, buffalo, samurai:
Antone's Dreams
Antone's Dreams

Dodging buffalo
In my dream, I'm walking down out of the mountains across a long field. At the far end of the fie...
Who needs a rope when you can fly?
In my dream, I'm in the mountains by a lake. Discovering that I can float or fly, I go skipping a...
Pancakes, royal reunions and samurai
In my dream, I'm eating pancakes with extended family. They all finish and clean up, but I want o...

not fly, buffalo, samurai:
Antone's Dreams
Antone's Dreams

Catching baseballs
In my dream, I'm standing behind and a little off to the right of the batter's box watching some ...
Dad's service shovel
In my dream, a friend and I are on the roof of some building. I've gotten a bunch of stickers in ...
Underwater kayaking
In my dream, my family and perhaps some extended family are climbing into kayaks at the edge of a...

Newsfeed display by CaRP

fly, buffalo, samurai, but not rope:
Antone's Dreams
Antone's Dreams

Dodging buffalo
In my dream, I'm walking down out of the mountains across a long field. At the far end of the fie...
Pancakes, royal reunions and samurai
In my dream, I'm eating pancakes with extended family. They all finish and clean up, but I want o...
Helio-copter
In my dream, I'm some sort of military special forces person. I've captured a one-man solar-power...

Newsfeed display by CaRP

fly in title, family in description, no extended:
Antone's Dreams
Antone's Dreams

Who needs a rope when you can fly?
In my dream, I'm in the mountains by a lake. Discovering that I can float or fly, I go skipping a...

Newsfeed display by CaRP