php - Refresh time on via javascript (systemtime) -


i have own php loginsystem. users logged out after 5 min of inactivity. want show timer in right top corner display countdown.

at moment using javascript.

like (pseudo, haven't code here @ moment):

var mytime = <?php echo time(); ?>;  window.setinterval(mytime = mytime - 1; $("#timertext").text(mytime), 1000); 

but don't solution. use current system time (php) , subtract time, user active @ last.

i found solution current system time via ajax. idea?

what think realize counter? there smart solution? maybe other way?


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -