I am using fsockopen() to check for open ports. It seems to be working when an active IP address is passed, but seems to always return a resource when the IP address parameter is blank or NULL when using port 80 or 22. What does this special case mean?
fsockopen("", 80, $err_code, $err_msg, 1) returns a resource
fsockopen("123", 80, $err_code, $err_msg, 1) returns FALSE
I would expect both to return FALSE.