function CarpShow($url, $cachefile = '', $showit = 1)
{
    global $carpconf, $carpoutput;
    $carpoutput = '';
    $cache = 0;
    if (strlen($cachefile)) {
        $cache = CarpSetCache($cachefile);
    } else {
        if (!$showit) {
            CarpError('No cache file indicated when calling CarpFilter or CarpShow with showit=0.', 0);
            return 0;
        }
    }
    if ($cache % 2 == 0) {
        require_once dirname(__FILE__) . '/carpinc.php';
        GetRSSFeed($url, $cache, $showit);
    } else {
        if ($showit) {
            CarpOutput(file($carpconf['cachefile']));
        }
    }
}
Example #2
0
function CarpShow($url, $cachefile = '', $showit = 1)
{
    global $carpconf, $carpoutput;
    if ($carpconf['phperrors'] >= 0) {
        $carpconf['savephperrors'] = error_reporting($carpconf['phperrors']);
    }
    $carpoutput = '';
    $cache = 0;
    if (strlen($cachefile)) {
        $cache = CarpSetCache($cachefile, $showit);
    } else {
        if (!$showit) {
            CarpError('No cache file indicated when calling CarpFilter or CarpShow with showit=0.', 0);
            $carpconf['cachefile'] = '';
            if ($carpconf['phperrors'] >= 0) {
                error_reporting($carpconf['savephperrors']);
            }
            return 0;
        }
    }
    if ($cache % 2 == 0) {
        require_once CarpDirName() . '/carpinc.php';
        GetRSSFeed($url, $cache, $showit);
    } else {
        if ($showit) {
            CarpOutput(file($carpconf['cachefile']));
        }
    }
    $carpconf['cachefile'] = '';
    if ($carpconf['phperrors'] >= 0) {
        error_reporting($carpconf['savephperrors']);
    }
}