How do I know how many seconds it will be until a php session expires?
I’m building a web application where users might spend a lot of time typing into big text fields, but for security reasons I still want sessions to time out after a reasonably short period. I want to warn them if their session is about to expire so they can save or take some other action to keep it alive.
Any tips?
thanks!
that’s very easy. you have always session timeout left, which is 1440 seconds by default. to get actual value you can use
but there is another way, better one. if your application get a text after session expired, save this text into session, ask for the password, and then save the text as if it was the regular submit.