Hi All,
Can anyone tell me the best way to avoid errors using fsockopen(). I have
tried wrapping the function call in a conditional statement, and have also
tried calling the function and then testing the return.
Example 1:
$sckHandle = fsockopen($server, 25, $errNo, $errString);
if ($sckHandle)
{
code here...
}
Example 2:
if ($sckHandle = fsockopen($server, 25, $errNo, $errString))
{
code here...
}
both give this error on failing to connect to a given server:
fsockopen(): unable to connect to mx3.hotmail.com:25
I was under the impression that example 2 would not trigger an error if
fsockopen() failed. Any help will be greatly appreciated.
Phil.
---
Phil Ewington - Technical Director
43 Plc - Ashdale House
35 Broad Street, Wokingham
Berkshire RG40 1AU
T: +44 (0)1189 789 500
F: +44 (0)1189 784 994
E: mailto:[EMAIL PROTECTED]
W: www.soyouthink.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php