They use the same method, but with a much longer logout delay -- such as ten or fifteen minutes. If the user hasn't requested another page within that time, they're said to be inactive.
They use the same method, but with a much longer logout delay -- such as ten or fifteen minutes. If the user hasn't requested another page within that time, they're said to be inactive.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Right but theres no frames that refresh and reset the users lastseen, so on every page, the users lastseen is updated, and then at the same time their time is checked against now. So no matter what they're considered always online. How do you make it so that they're logged off after 15 minutes of not going to a different page?
Sorry if my question makes no sense.
You have to check their time against now whenever another user accesses a page as well, not just when they do. Basically, every time a page is requested by anyone, member, guest, whatever, you have to go through a list of the users considered online, check their lastseen against now, and update their status appropriately.the users lastseen is updated, and then at the same time their time is checked against now.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
OHHHHH!
I get it now hahaha.
Allright well how would i check one user's time when a different user accesses a page? Do i check every single users Lastseen against NOW() everytime a page is accessed?
That would make sense to me.![]()
You only need to check the users that are logged in, and obviously there's no need to check the user who made the request, as you've pointed out above.Do i check every single users Lastseen against NOW() everytime a page is accessed?
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Right.
Well, awesome, i finally get it!
Thanks Twey.![]()
Bookmarks