Hi,

I have been using the CaRP RSS to html converter and for this I implemented over 50 cron jobs (one for each news category on a website) to keep things speedy.
Recently they were all cut off due to them being a big drain on server resources. The solution to this I was told, is to use a script similar to this (which I have named "update.php":


Code:
<?php

# Create the associative array as LongName => ShortName
# Add as many as needed. Be sure to use a comma at the end.
$celebs = array(
    'GeorgeClooney' => 'clooney',
    'CherylCole'    => 'cole',
    'Couples'       => 'couples',
    'Actors'       => 'actors',
);

# Loop through every item in the array and perform some action.
foreach ( $celebs as $lname => $sname ) {
    echo "Do something for long name $lname or for short name $sname\n";
}

?>

<?php # Create the associative array as LongName => ShortName # Add as many as needed. Be sure to use a comma at the end. $celebs = array( 'GeorgeClooney' => 'clooney', 'CherylCole' => 'cole', 'Couples' => 'couples', 'Actors' => 'actors', ); # Loop through every item in the array and perform some action. foreach ( $celebs as $lname => $sname ) { echo "Do something for long name $lname or for short name $sname\n"; } ?>
Now, I have done this, but the echo statement is apparently not appropriate and instead the CarpConf and CarpCache functions in the following script should be put in its place. The problem is that I have about 50 odd scripts to run and I fail to see how I can achieve this with one mention of the the Carp functions.

So, for example, I have the update_actors.php script, as follows:

Code:
<?php
require_once '/usr/local/apache/celebsusa/carp/carp/carp.php';

/* set the cache interval to 1 minute (you'll control how often the cache is actually refreshed with your cron settings, not here) */
CarpConf('cacheinterval',1);

CarpCache('http://feeds.feedburner.com/actorsc','actors');
?>

<?php require_once '/usr/local/apache/celebsusa/carp/carp/carp.php'; /* set the cache interval to 1 minute (you'll control how often the cache is actually refreshed with your cron settings, not here) */ CarpConf('cacheinterval',1); CarpCache('http://feeds.feedburner.com/actorsc','actors'); ?>
I have added the variable "?value=actors" to the URL of this script in the hope of it being picked up and run by the update.php script. This hasn't happened though.

Therefore, there is obviously something missing here and it must be the CarpCache and CarpConf parts of the update script.

Does anyone have any idea how I can get this working?

Thanks,
Dan

ps. I have posted on the Carp forums and also the Daniweb forums but with no luck as of yet unfortunately.