note 27646 modified in function.connection-aborted by vrana

From: Date: Tue, 17 Aug 2004 14:55:08 +0000
Subject: note 27646 modified in function.connection-aborted by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79914@lists.php.net to get a copy of this message
I know why nobody can use the functions connection_XXX(). If the php code do not send anything to buffer, the php dont check the connection, so, the connection_timeout will still NORMAL and will not be ABORTED. Ex <?php Set_Time_Limit(0); //this you know what gonna do Ignore_User_Abort(True); //this will force the script running at the end While(!Connection_Aborted()) { Echo "\n"; //this will save de while Flush(); //Now php will check de connection While(CONDITION) { Echo "My chat...."; } Sleep(1); } ?> end --was-- I know why nobody can use the functions connection_XXX(). If the php code do not send anything to buffer, the php dont check the connection, so, the connection_timeout will still NORMAL and will not be ABORTED. Ex Set_Time_Limit(0); //this you know what gonna do Ignore_User_Abort(True); //this will force the script running at the end While(!Connection_Aborted()) { Echo "\n"; //this will save de while Flush(); //Now php will check de connection While(CONDITION) { Echo "My chat...."; } Sleep(1); } end http://php.net/manual/en/function.connection-aborted.php

« previous php.notes (#79914) next »