Re: disconnect



On Thu, 28 Apr 2005 22:29:22 +0100, in alt.php Andy Hassall
<andy@xxxxxxxxxxx> wrote:

>| On Thu, 28 Apr 2005 23:21:07 +0200, "ste" <str@xxxxxxxxxxx> wrote:
>|
>| >Is it possible to know when a client disconnect physically from apache
>| >server
>|
>| That would be at the end of the script, or possibly earlier.
>|
>| http://uk2.php.net/manual/en/features.connection-handling.php
>| http://uk2.php.net/register_shutdown_function
>|
>| ... or just at the bottom of the file.
>|
>| Or possibly a bit later due to HTTP/1.1 keepalives, it depends what you're
>| after.
>|
>| >(in another words when the clients closes its browser)
>|
>| Closing the browser has nothing to do with closing the connection to Apache.
>|
>| >I'm doing a php extension under win32/apache and I don't "see" any message
>| >I can trap to detect that kind of state...
>|
>| There is no reliable way to do this; it's not how HTTP works.
>|
>| There are possibly Javascript methods to do this, try comp.lang.javascript for
>| more details.

Not even javascripting can help :-(
If the user clicks on a button on your page then you can capture this
event. If the user types in an address in the Address bar, used
favourites or closes the browser window completely then there is no
way of capturing this event.
---------------------------------------------------------------
jnorthau@xxxxxxxxxxxxxxxxxxxxx : Remove your pants to reply
---------------------------------------------------------------
.


Quantcast