<?phpinclude('./config.php');include('./admin.php');$maxtime=600; // max script run time X secs$delay=10; // update every X secs$start=time();while(!$done){ list($count)=mysql_fetch_row(mysql_query("select count(*) from lm_sendq")); echo date("Y-m-d H:i:s T")." <b>$count</b> messages left<br>"; flush(); $diff = time()-$start; if($diff>=$maxtime) $done=1; else sleep($delay);}echo "Maximum execution time reached.<br>";?>