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 display any items from five different newsfeeds which contain the word "Microsoft" in either the title or description.
Note that it is a good idea to set up background refreshing when accessing so many newsfeeds from the same page.
Also note how $carpconf['poweredby'] was set to '' to avoid having "Newsfeed display by CaRP" displayed after the items extracted from each feed:
<?php
require_once "/path/to/carp.php";
// don't show any channel fields
CarpConf('cborder','');
// display a bullet before each item
CarpConf('bi','&bull ');
// only show items mentioning Microsoft
CarpConf('filterin','microsoft');
// show up to 3 items from each newsfeed
CarpConf('maxitems',3);
// show up to 100 characters of the description
CarpConf('maxidesc',100);
// don't show "Newsfeed display by CaRP" after each newsfeed
CarpConf('poweredby','');
// Update every 2 hours
CarpConf('cacheinterval',120);
// filter and display the data from each newsfeed
CarpCacheShow('http://www.osopinion.com/OSOlinks2.xml');
CarpCacheShow('http://trainedmonkey.com/news/rss.php?s=31');
CarpCacheShow('http://trainedmonkey.com/news/rss.php?s=30');
CarpCacheShow('http://www.wired.com/news_drop/netcenter/netcenter.rdf');
CarpCacheShow('http://www.ecommercetimes.com/perl/syndication/rssfull.pl');
?><br>
<i><a href="http://www.geckotribe.com/rss/" target="_blank">Newsfeed display by CaRP</a></i>