开发者

How do you keep track of the session time out in php?

I want to keep track of the session time out from the web page. How do I do it? Let say, a client is on the order product page and for some reason after 10mins without clicking order the product or exit the order page, the time out window pop up. If something like t开发者_JAVA技巧hat happened (time out issue), I want to catch it and update the information to our database? How do I do it? thanks


You would need to incorporate javascript into your solution. You would need to start a timer when you hit a page and then, when the timer hit a certain number of seconds, update the database via ajax and then create the pop up notification.


Once the session is gone, it's gone and you cannot distinguish it from a request that crafted it's own session identifier. You would have o keep track of used session identifiers yourself by implementing custom session handlers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜