RE: [PHP] close the browser
| From: | hadi | Date: | Tue, 24 Jun 2014 17:18:30 +0000 |
| Subject: | RE: [PHP] close the browser | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323534@lists.php.net to get a copy of this message | ||
>I get that, but why do you want to run a script? Based on your previous
>emails it looks like you're trying to manually expire a session. Sessions
>usually expire due to a timeout since the last request, and I've never >come
>across a reason to do it any other way. So again, what is it that you are
>actually trying to achieve?
>If you want to apply a more complicated set of session expiry rules you can
>do so with a custom session handler, but I would question the need for such a
>thing.
Well im trying to achieve one thing here. If a user is logged in and if he
try to logged in again from different pc with the same username/password it
well flag him out. Because he already logged in.
About connection close, when the user close the connection it well clear the
flag.
So what do I use to accomplish this ?
On 24 June 2014 17:48, hadi <almarzuki2011@hotmail.com> wrote:
> Not reliably. What is it that you are trying to achieve?
Im building captive portal (internet hostspot) I would like to determine if
connection close between the user and server. If so run a script.
What do you suggest to do ?
I get that, but why do you want to run a script? Based on your previous emails
it looks like you're trying to manually expire a session. Sessions usually
expire due to a timeout since the last request, and I've never come across a
reason to do it any other way. So again, what is it that you are actually
trying to achieve?
If you want to apply a more complicated set of session expiry rules you can do
so with a custom session handler, but I would question the need for such a
thing.
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
> On 24 June 2014 17:08, hadi <almarzuki2011@hotmail.com> wrote:
>
> > Hi,
> >
> > Is there's any way to run script when user close the browser in php ?
> >
> > Thanks .
> >
>
> Not reliably. What is it that you are trying to achieve?
>
> -Stuart
>
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
Attachment: [application/pkcs7-signature] smime.p7s
Attachment: [application/pkcs7-signature] smime.p7s