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.

so basically you need to send a small 8 bit buffer for your host to actually attempt a connection

try doing something like:

PHP Code: 
try
    {
        
$socket fsockopen($host,$port,$e_number,$e_string,$timeout);
        
fwrite($socket,str_repeat(" ",8));
    }catch(
Exception $e)
    {
        
//Not a valid domain more than likly!
        
return false;
    } 
if im right, http is based over RTP connections and not UDP, im not sure if RTP is also connectionless