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
Getting Started: Free Download | Purchase | Install
Reference: Functions | Plugins | Themes | Full Index
Etc.: Display Formatting | Example Code | Affiliates
CarpCache( url, cachefile );
Store a local copy of a newsfeedEvolution | LE | Koi | SE |
All | All | All | >=2.7.1 |
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. After this function completes, $carpconf['mtime'] will contain the UNIX timestamp for the last time the cache was updated.
Arguments:
- url: The address of the RSS newsfeed. May be a URL, path to a local file, or data from a Grouper cache specified as "grouper:cache-name". Note that Grouper must be loaded before calling CarpCache if using the "grouper:" syntax.
- cachefile: The filename of the local cache file.
Return value: 1 if it was necessary to refresh the cache, or 0 if the file in the cache was recent enough that it was not necessary.
Usage Example:
<?php require_once '/home/geckotribe/carp/carp.php'; if (CarpCache('http://www.geckotribe.com/press/rss/pr.rss','gecko_tribe_press_releases.rss')) { CarpFilter(CarpCachePath().'/gecko_tribe_press_releases.rss','gt_press_releases'); } CarpFilter('/home/geckotribe/public_html/feeds/myfeed.rss','myfeed'); CarpAggregate('gt_press_releases|myfeed'); ?>