note 31275 added to function.fsockopen

From: Date: Wed, 16 Apr 2003 05:15:15 +0000
Subject: note 31275 added to function.fsockopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-46669@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. -- http://www.php.net/manual/en/function.fsockopen.php http://master.php.net/manage/user-notes.php?action=edit+31275 http://master.php.net/manage/user-notes.php?action=delete+31275 http://master.php.net/manage/user-notes.php?action=reject+31275

« previous php.notes (#46669) next »