CaRP Evolution Documentation
CaRP Evolution Documentation
twitter youtube linkedin google-plus
CaRP Evolution Box
Web This Site

CaRP: Caching RSS Parser - Documentation


CaRP Interactive FAQ
Getting Started: Free Download | Purchase | Install
Reference: Functions | Plugins | Themes | Full Index
Etc.: Display Formatting | Example Code | Affiliates

"rss20": RSS 2.0 Theme

Author: Antone Roundy
Filename: rss20.php
MyCarpConfReset name: n/a
Current version: 1.0
Compatibility:
GPL Koi Evolution
n/a n/a >=4.0

Description:
This theme configures CaRP to output in RSS 2.0 format, and provides an additional function to assist in the process.

IMPORTANT: If you set the "outputformat" confirmation setting to 2 (to store CaRP's output in $carpoutput instead of displaying it), you must copy $carpoutput immediately after calling RSS20Aggregate, because subsequent calls to CarpCacheFilter and CarpAggregate will overwrite it, not append to it.

Example:

The following code shows how you could make a "mashup" feed using the feeds from Slashdot and Ars Technica using this plugin. Important points to note:
<?php
header('Content-Type: application/xml');

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

CarpConf('encodingout','UTF-8');

CarpLoadTheme('rss20.php');

RSS20Aggregate('My Feed','http://example.com/','I describe it thus');
CarpCacheFilter('http://rss.slashdot.org/Slashdot/slashdot','slashdot');
CarpCacheFilter('http://arstechnica.com/etc/rdf/ars.rdf','ars');
CarpAggregate('slashdot|ars');
?>