Hi, I am currently attempting to develop an online game. I have so far achieved the results I want using JavaScript but have now been informed it would be easy to cheat because JavaScript is client side. So I have now began attempting to achieve the same results using PHP. Ive started trying to rescript the countdown timer but can't seem to get a satisfactory alternative to setTimeout (in JS). I have tried sleep() and usleep() but i'm either using them incorrectly or they won't do what I need. The link to what the 'game' (in inverted commas because its far from that yet) should be like (in JS) is here: [url=http://www.bibliocommerce.com/test/chop_wood.php]http://www.bibliocommerce.com/test/chop_wood.php[/url] The code for the alternative countdown timer I have been working on is here but it will not work, it keeps reposting the same values. Like I said I tried using sleep(), but then the page doesn't even load! Here is the code: [code]PHP Code: <?php function display(){ $milisec = 0; $seconds = 5; $milisec -= 1; if ($milisec <= -1){ $milisec = 9; $seconds -= 1; } do { echo $seconds.".".$milisec; } while ($milisec > 0 && $seconds > 0); } display(); ?> [/code] And a link to a working version here: [url=http://www.bibliocommerce.com/test/php_function.php]http://www.bibliocommerce.com/test/php_function.php[/url] WARNING: Don't visit the link if you don't want your browser to crash! It might not, but then again... I just need some way to pause the script for a second then execute it again, then pause, then execute and so on... Thank you in advance.