Re: Close Connection to Browser

From: Date: Mon, 30 Jun 2003 06:14:19 +0000
Subject: Re: Close Connection to Browser
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-153366@lists.php.net to get a copy of this message
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:
Hi, is it possible to close the connection to the client/browser without calling exit? 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. Thanks, Thomas 'Neo' Weber --- thomas@youngarts.org neo@gothic-chat.de


« previous php.general (#153366) next »