Jump to content

[SOLVED] fsockopen returns Success when fails ???


rbrown

Recommended Posts

If I use this:

$fp=fsockopen($ip_address_lookup, $port, $errno, $errstr, 4);

 

And I intentionally enter an invalid domain name so I don't get an ip address I get:

 

0= $errno

Success=$errstr

 

And if I use a valid domain name I get:

 

0= $errno

=$errstr

 

Any idea why?

Thanks,

 

"UDP sockets will sometimes appear to have opened without an error, even if the remote host is unreachable. The error will only become apparent when you read or write data to/from the socket. The reason for this is because UDP is a "connectionless" protocol, which means that the operating system does not try to establish a link for the socket until it actually needs to send or receive data."

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.