RE: [PHP] fsockopen

From: Date: Mon, 05 May 2003 01:02:27 +0000
Subject: RE: [PHP] fsockopen
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146387@lists.php.net to get a copy of this message
sorry i've had the same reply to this i supress most functions with @ but it doesnt work in this case still triggers an error -----Original Message----- From: Ernest E Vogelsinger [mailto:ernest@vogelsinger.at] Sent: Sunday, May 04, 2003 7:33 PM To: dan rossi Cc: Php-General Subject: Re: [PHP] fsockopen At 05:36 04.05.2003, dan rossi said: --------------------[snip]-------------------- >hi guys is there anyway to prevent php from giving error if an invalid host >is given to fsocketopen? --------------------[snip]-------------------- Try $hstream = @fsockopen($host, $port, $errno, $errstr, $timeout); Note the '@' that should suppress error messages. If you don't get a valid $hstream you can check $errno and $errstr for the cause. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#146387) next »