|
Posted by Gregor Rot on 08/27/05 10:48
Michael Vilain wrote:
> In article <demp3p020km@enews3.newsguy.com>,
> Gregor Rot <dontwriteme@email> wrote:
>
>
>>Hi,
>>
>>how to detect if a user closes the browser and so ends the php session?
>>(i have a login system and i need to know if somebody doesn't logout of
>>it, just closes the browser).
>>
>>For example: i have user1 with a username and password, i just want to
>>disable somebody to double login with the same username and password (at
>>the same time of course).
>>
>>What is the best way to do it?
>>
>>tnx,
>>Greg
>
>
> Since closing the browser is totally a function of the client and php
> runs on the server, there's really no way to do this with php alone. If
> you associate a timestamp with a session ID, you can expire sessions
> based on a reasonable length of time. I don't see any other way to do
> this.
>
Thank you - but is there any way to detect session activity : basically
then, i want a user to be logged out of the system (that involves a
change in a mysql database) if idle for more then some time...
tnx,
Greg
Navigation:
[Reply to this message]
|