That should really be done on the backend, as you can never trust the client to do anything. So in the session varable, set a timestampt of the unix epoch, and if the next page load is more then 120 seconds (2 * 60 = 120) then log the user out, else store to new time that user was last seen.
((time() - $_SESSION['epoc']) > 120) ? logout() : $_SESSION['epoc'] = time(); On Fri, Dec 4, 2009 at 3:55 PM, Michael Issa <[email protected]> wrote: > hi, > > can someone please tell me how it include an inactivity timeout on my > pages. > > basically, the ' logout' script is called if no activity for 2 mins > > regards > mike > > -- > > You received this message because you are subscribed to the Google Groups > "iPhoneWebDev" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/iphonewebdev?hl=en. > > > -- Thank you for your time, Mark 'Dygear' Tomlin; -- You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en.
