Page Session Countdown Timer -


i wrote php code kills session after 5 minuets creation.

i display timer in corner of page shows user how many minutes:seconds till session times out. there examples out there?

something this? http://keith-wood.name/countdown.html

there have simple example showing how use it:

var newyear = new date();  newyear = new date(newyear.getfullyear() + 1, 1 - 1, 1);  $('#defaultcountdown').countdown({until: newyear});  

so need unix timestamp (time when session end). can modify this:

var endofsession = new date(youtitmestamp * 1000); // timestamp in seconds , need miliseconds $('#defaultcountdown').countdown({until: endofsession});  

hope helped!


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -