Hmm, what you've given works for me with my server (i have webmin running on port 10000). I checked out http://161.58.175.241:2000/index.html. I don't think anything is running on that server.
Anyway, here is a longer (but surer) way to do it:
$contents = "";
$sd = fsockopen("161.58.175.241", 2000, &$errno, &$errstr);
if(!sd)
{
echo "Error $errno: $errstr";
fclose($resultfile);
exit();
} else {
fputs($sd, "GET index.html HTTP/1.0\n\n");
while(!feof($sd))
{
$contents .= fgets($sd, 1024);
}
}
print $contents;
Okay, this will return you the document, but with HTTP headers. But you method should work..... here, try to open: http://www.texturedigital.com:10000/ using fopen and even if THAT doesn't work, then try the second method of directly connecting to the server using socket functions.
hope this helps,
-sridhar