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

Styles & Classes | Multiple Feeds on a Page | Unordered List | Background Refreshing | Filtering | Aggregating 1 | Aggregating 2 | Associates | 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:

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

// don't display any channel fields

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

// set up the filtering

// show up to 4 items

// show upt o 100 characters from the description

// refresh every 2 hours

// Filter each newsfeed and cache the results
CarpCacheFilter("", "agg2-slashdot");
CarpCacheFilter("", "agg2-infoworld");

// combine the results from the two newsfeeds
Example Output:

[CaRP] Can't open remote newsfeed [404].

[CaRP] Cache file not found.
VM-Neutral Node.js API Unveiled, As NodeSource Collaborates With Microsoft, M...
by EditorDavid
3 Dec 2016 at 2:39pm
An anonymous reader writes: This week saw the first proof of concept for Node.js API (or NAPI fo...
China's New 'Social Credit Score' Law Means Full Access To Customer Data
by EditorDavid
3 Dec 2016 at 12:39pm
AnonymousCube shares this quote about China's new 'Social Credit Score' law from an insurance ind...
Of 8 Tech Companies, Only Twitter Says It Would Refuse To Help Build Muslim R...
by BeauHD
3 Dec 2016 at 7:00am
On the campaign trail last year, President-elect Donald Trump said he would consider requiring Mu...
Alien Life Could Thrive In the Clouds of Failed Stars
by BeauHD
3 Dec 2016 at 1:00am
sciencehabit writes: There's an abundant new swath of cosmic real estate that life could call hom...