Hi All, How can I stop fsockopen() throwing an error and killing my script when it cannot connect?
I have tried the following: $this->_Socket = fsockopen($s_server, $this->_Port, $i_errno, $s_errstr, $this->_Timeout); if (!$this->_Socket) { ... code to handle connection failure } and ... if (!$this->_Socket = fsockopen($s_server, $this->_Port, $i_errno, $s_errstr, $this->_Timeout)) { ... code to handle connection failure } I have also tried prefixing fsockopen() with @ but when it fails to connect it kills my script by throwing an error. Any advise here will be much appreciated as this code is mission critical. TIA - Phil. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.690 / Virus Database: 451 - Release Date: 22/05/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php