Twey: Thanks for the tip I've never heard that before. Also I might have done my math wrong, but won't your code only run update() once a day. I think it should be this.
PHP Code:<?php
define('DATA_FILE', 'update_tracker.dat');
$c = floor(date('U') / 60 / 60);
//Removed the extra /24 above
$fc = file(DATA_FILE) or die('Failed to open file for reading.');
$l = $fc[0];
while($l++ < $c)
update();
$f = fopen(DATA_FILE, 'w') or die('Failed to open file for writing.');
fwrite($f, $c);
fclose($f);
?>
