Reputation: 21
I am developing a community site where many user can join and do some activity...Now a problem arise and I didn't handle it and need your help ... here is the details
I'm using classic ASP ,php, and jQuery Have a logout script that works fine Have a timer that will redirect user to the logout page and that works fine too Have a jquery .unload() event too
But what if an user didn't go through any of these? If he power off his pc or turn off the data connection on his mobile/tablet ? Or any other incident that let him go through the checking ?
Additionally I'm also storing IP address of the user, is there any way to check that IP is still connected from my server through a code that will run automatically or scheduled so I can change that user status to the database so the other user will get the exact status of that user.
Regards. Debasis
Upvotes: 0
Views: 145
Reputation: 61
You can either: - use websockets to create a bidirectional connection between client and server, this allows you to detect when a client disconnects
Or
Upvotes: 2