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

CarpShow( url [, cachefile [, showit]] );

Display a newsfeed
EvolutionLEKoiSE
AllAllAll>=2.7
Description:
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. If a cache file was specified, $carpconf['mtime'] will contain the UNIX timestamp for the last time the cache was updated after this function is called.

Arguments:
  1. 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 CarpShow if using the "grouper:" syntax.
  2. 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.
  3. 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.

Return value: none

Usage Example:
<?php
require_once '/home/geckotribe/carp/carp.php';
CarpShow('/home/geckotribe/public_html/feeds/myfeed.rss','cached_output.html');
?>