I'm trying to use fsockopen() to connect from my apache server to a remote API server. The remote server script I need to connect to runs on port 8080.
The following keeps returning a 101 connection timed out
error:
$fp = fsockopen('remote.example.com', '8080', $errno, $errstr, 10);
Do I need to open port 8080 on my server in order to connect to that port on the remote server?
And if so, is there any way to do that using e.g. .htaccess
, or would I have to modify httpd.conf for that?
Thanks!
ADDED
Thanks everybody for the replies. You were all correct, but I can only accept 1 answer, so I accepted the first one.
If anyone is interested: this is on a Wiredtree server and after emailing support, they said that they have that disabled by default for security reasons (also cURL), but they can enable it upon request. I'm sure that once they do, this problem will be solved.
Thought I'd post this in case anyone else is experiencing the same problem in the future.