Faking Cron with PEAR Cache and date()
If you don’t have access to cron on your server, but you want to run some php code periodically, this is a handy way of doing that using output caching and the date function. This assumes you’ll be using PEAR’s Cache module. Here’s the code, and and explanation. require_once( ‘Cache/Output.php’ );$cache = new Cache_output(‘file’, array(‘cache_dir’=>CACHE_DIR));$cache_id …