Take a look at register_shutdown_function, it sounds like it might do what you want just be aware that you obviously can't display output once the connection is closed because no one is listening .

void register_shutdown_function ( callback function)

Registers the function named by function to be executed when script processing is complete. If the function function does not exist (undefined), an error of level E_WARNING is generated.

Thomas Weber wrote:


is it possible to close the connection to the client/browser without calling
I have an input-script for a chat-system, wich gives a Status 204 No Content
to the client after submit, wich works great. The problem is, that sometimes
the script needs some time to finish after sending the 204 and keeps the
connection over this time, wich couses Internet Explorer and sometimes even
Mozilla to crash if too much connections to the script are active.

Thomas 'Neo' Weber

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to