Jump to content

TIMER - COUNTS 5 - RESTARTS


Mudsaf

Recommended Posts

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 by Mudsaf
Link to comment
Share on other sites

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

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

it sounds like you need to check ajax

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...