note 31275 rejected from function.fsockopen by alindeman

From: Date: Wed, 16 Apr 2003 11:28:34 +0000
Subject: note 31275 rejected from function.fsockopen by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-46680@lists.php.net to get a copy of this message
I do the normal fsockopen thing but if the connection fails the function spits out a warning regardless. Anybody know whats with this ? Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed in /home/.../.../scriptname.php on line 13 Offending line: $fp = fsockopen($who, $hport, &$errno, &$errstr, 4); I want to control the output by using: if (!$fp){ ..do something But the warning is spat out before the script even gets to the check.

« previous php.notes (#46680) next »