$fsock=fsockopen($domain, 80, $errno, $errstr,2);
$fsock=fsockopen("ssl://".$domain, 443, $errno, $errstr,2);