Does anybody determine if you'll be able to identify if the browser has closed the bond throughout the execution of the lengthy PHP script, when utilizing apache and mod_php?

For instance, in Java, the HttpOutputStream will throw the best if a person tries to email it following the browser has closed it -- Or will respond adversely to checkError().


Most likely easier should you simply want a script to die and handle it whenever a user terminates.

( Ie: whether it would be a extended search, this could help you save a lot of operation cycles )

In a minimum of PHP4, connection_aborted and connection_status only labored following the script sent any output towards the browser (using: flush() doctor_flush()). Also pricier precisely timed results.

It's mainly helpful to see if there's still someone waiting on the other hand.