PHP检查连接到远程SSL地址

Is there any reliable way via PHP to check if a local WebServer (php4) can access a remote SSL address ?

https://xxx.yyy.com port 443 ?

All I'm interested in ensuring is the connection from the WebServer to the remote address is working and on port 443. I'm not bothered about checking certificates etc..

Thanks

UPDATE:

I've tried this, but is it reliable ?

<?php 
function checkConnection() 
{ 
    $conn = @fsockopen("www.abc.com", 443, $errno, $errstr, 30); 
    if ($conn)
    { 
        $status = "Connection is OK";  
        fclose($conn);
    }
    else
    {
        $status = "NO Connection<br/>
";
        $status .= "$errstr ($errno)"; 
    }
    return $status; 
}

echo checkConnection();
?>