note 27262 added to function.connection-aborted
| From: | ron at rack1 dot php dot net | Date: | Fri, 29 Nov 2002 14:29:06 +0000 |
| Subject: | note 27262 added to function.connection-aborted | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40114@lists.php.net to get a copy of this message | ||
for some (to me, unknown) reason, none of the connection handling functions seem to work (PHP 4.1.2
on Apache 1.3.26).
i don't like this solution at all for getting around this problem, but it's better than
nothing:
function alt_connection_aborted()
{
$ip = str_replace(".", "\\.", getenv("REMOTE_ADDR"));
$port = getenv("REMOTE_PORT");
return (preg_match("/^tcp +[0-9]+ +[0-9]+
+[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}:[0-9]+ +$ip:$port +.*?$/m",
netstat -n
--tcp))?false:true;
}
--
http://www.php.net/manual/en/function.connection-aborted.php
http://master.php.net/manage/user-notes.php?action=edit+27262
http://master.php.net/manage/user-notes.php?action=delete+27262
http://master.php.net/manage/user-notes.php?action=reject+27262