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

Functions

The following functions are provided by CaRP for use by your web pages. All other functions are intended only for internal use or backward compatibility with earlier versions, and may changed or removed without notice.

Arguments listed in square braces are optional. If more than one optional argument is listed and you wish to set the values of any but the first, you must also set the values of any preceeding arguments.

  • CarpConf(option name(s),value);
    Sets a CaRP configuration option to the specified value. You may set more than one option to the same value at the same time by listing the option names, separated by pipe characters (|). See the configuration page for a list of available configuration options.
    option name(s): The name of the option or options to set.
    value: The value to which to set the option or options.
     
  • CarpConfReset();
    Resets all of the values in $carpconf (which control CaRP's behavior and the appearance of newsfeeds) to the default values specified in carp.php.
     
  • CarpShow(url [, cachefile [, showit]]);
    Fetches an RSS newsfeed from the internet, a local file, or a local cache file and displays it according to any settings you may have specified.
    url: The address of the RSS newsfeed.
    cachefile:: The filename of the cache file in which to store a reformatted copy of the newsfeed, based on your configuration settings. If this argument is omitted, no cache file is used, and the newsfeed is re-fetched and re-formatted every time. We recommend only doing this while working on the formatting (unless using CarpCache, described below, to maintain a local copy of the newsfeed). Once you have decided how you want the feed to be displayed, you will get significantly better performance by specifying a cache file.
    showit: If you set this argument to 0, CarpShow will behave identically to CarpFilter. Note that you do not need to do this or use CarpFilter to get filtering functionality.
     
  • CarpFilter(url, cachefile);
    Fetches an RSS newsfeed and saves a number of items from it in a formated based on your configuration settings in a cache file which may later be used by CarpAggregate. Unless you have specified values for the "filterin" or "filterout" options, it won't actually perform any filtering. Note that only item information is cached--because this function is used to aggregate news stories from multiple sources and display them together, channel information is discarded.
    url: The address of the RSS newsfeed.
    cachefile:: The filename of the cache file in which to store a reformatted copy of the newsfeed, based on your configuration settings. Unlike CarpShow, CarpFilter requires a cache file to be specified. Note that while you are working on the formatting of a newsfeed, you will need to delete the cache file each time you wish to change it's appearance in order for it to update.
     
  • CarpAggregate(cache file(s));
    Retrieves the most recent items from the cache file or files listed and displays them, newest first. Note that the ordering of items may not be correct unless the newsfeeds supply either a pubDate or dc:date for each item.
    cache file(s): The name or names of any number of cache files created by CarpFilter. When specifying more than one cache file, separate the filenames with a pipe character (|). Do not include spaces before or after the filenames.
     
  • CarpCache(url, cachefile);
    Fetches an RSS newsfeed and stores it, unmodified, in a local cache file. The cache file is refreshed if it is older than the number of minutes specified in the cacheinterval configuration setting, or based on the value of cachetime.
    url: The address of the RSS newsfeed.
    cachefile:: The filename of the local cache file.

"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!