Mudsaf Posted August 15, 2012 Share Posted August 15, 2012 (edited) Hello, im trying to make counter that takes 5 seconds and after that runs if script and restarts. so the IF content would be refreshed for every 5 seconds whitout refreshing the webpage. Tried something like this but wont work if ($start_time > 5) {$start_time = 0;} else {$start_time = microtime(); } Edited August 15, 2012 by Mudsaf Link to comment Share on other sites More sharing options...
birbal Posted August 15, 2012 Share Posted August 15, 2012 I am not sure what you re trying to do, if you want to pause script execution for certain amount of time there is a function for that http://php.net/sleep Link to comment Share on other sites More sharing options...
Mudsaf Posted August 15, 2012 Author Share Posted August 15, 2012 Im trying to make "check server status" that updates every 5 seconds whitout refreshing the page or pressing "refresh" button/text (So it would be automated). Got server status script done already. Link to comment Share on other sites More sharing options...
birbal Posted August 15, 2012 Share Posted August 15, 2012 it sounds like you need to check ajax Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now