Hi,
I have been using the CaRP RSS to html converter and for this I implemented a number of cron jobs 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":
<?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:
<?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 fit hopefully the final piece of this puzzle?
Thanks,
Dan
ps. I have posted on the Carp forums but the chances of getting a reply there are fairly slim from past experiences.