The following code fails to connect with the error message: 111 - Connection refused
$SockErr = 0;
$SockErrMsg = "";
if (!$Socket_Fd = fsockopen('96.38.238.50', '8000', &$SockErr, &$SockErrMsg))
{ echo $SockErr . ' - ' . $SockErrMsg;
exit;
}
yet, if I paste 96.38.238.50:8000 into the browser it connects just fine.
Apparently, I am doing something basically wrong.
Can anyone help?
Thanks
Socket Programming
Moderator: General Moderators
Re: Socket Programming
Works fine for me. Perhaps there's a firewall blocking the connection?
Re: Socket Programming
It was our hosting service. They do not allow any ports except 80 and the corresponding https port.