i need a timer that count down the time from 30 to 0 and if the timer is zero the script run php code # 1 ( the timer will stop and if user refreshes the page it is still zero) and if the user hit button # 1 the timer will restart to 30 and the script will run php code # 2 ( the timer will count down again until it is zero). i want the script to work between 1 pm to 3pm(so it starts automatically i at 1)and if the timer didn't get to zero until 3pm i want it to stop counting down and show a message or goes to a different page.
and obviously the timer should show a same number for all the users!
is there any way to do that and if yes how?
can i do it with ajax and if yes how?