javascript - how to construct a safe server side countdown timer -


i have quiz application in there countdown timer of 300 seconds answer 10 questions , after scores sent server , compared answers , stored . problem when make countdown timer client side javascript , can mess it, whether use cookies or use code , can altered user . there way make safe countdown timer using php cannot changed user explicitly. i'm stuck in issue.thanks in advance !

if user can re-participate store end time in session or cookie variable in beginning

if(!isset($_session['endtime'])) $_session['endtime']=strtotime("+300"); else if($_session['endtime']>strtotime("now")){ //game on } 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

android - IBM Worklight 6.1 [Application Error] There was a network error (file:///android_asset/www/index.html) -