Bobafart
03-15-2007, 11:32 PM
I have coded a JS countdown timer which is all good and fine if the users continues to view the page.
But how would I create a (fairly secure) countdown timer which includes PHP based server-side checks so that if the user leaves the page and then returns to the page the countdown timer continues uninterrupted?
I was thinking about writing a PHP app to do this.. but I am honestly unsure about the best way to go about this... any ideas please?
I don't want to use cookies, by the way, since they are less secure. It has to be JS/PHP based (I am using mySQL as my db).
I ask because I am making a little web game where the user builds units (like an RTS) .. if he/she clicks "build" the 2 minute countdown timer starts, he can then surf to different pages and then when he/she comes back the countdown timer will continue to countdown
But how would I create a (fairly secure) countdown timer which includes PHP based server-side checks so that if the user leaves the page and then returns to the page the countdown timer continues uninterrupted?
I was thinking about writing a PHP app to do this.. but I am honestly unsure about the best way to go about this... any ideas please?
I don't want to use cookies, by the way, since they are less secure. It has to be JS/PHP based (I am using mySQL as my db).
I ask because I am making a little web game where the user builds units (like an RTS) .. if he/she clicks "build" the 2 minute countdown timer starts, he can then surf to different pages and then when he/she comes back the countdown timer will continue to countdown