Detecting user_abort when using ob_start().
| From: | Mathijs | Date: | Fri, 16 Feb 2007 08:50:42 +0000 |
| Subject: | Detecting user_abort when using ob_start(). | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-248949@lists.php.net to get a copy of this message | ||
Hello there,
I have a script which is called using ajax.
This script can take a while executing.
Now it sometimes happens that a user aborts a connection, like stop the ajax request.
This won't stop the php script from executing.
Now i need some way to detect if the user has stoped/aborted the connection.
I tryed to use connection_aborted and/or connection_status.
But this doesn't seem to work or something.
I Tryed to search for a sollution, but not much luck.
Also, i use ob_start() because of headers that needs to be sent and to compress etc..
Thx in advance.