I'm new to the PHP world and trying to work my way through a problem. I've gone down many roads, but can't seem to find the answer. I'm not even sure this is so much a PHP question at this point as a host configuration issue.
I'm trying to grab an XML file from a remote server.
My first try was to try to shell out a wget as follows:
exec("wget -q -O status.xml - http://$username:$password@$hostname:$port/cgi-bin/status.xml",$xmlget,$err);
This didn't work. Not a surprise since doing it directly from SSH gave:
Connecting to mydomain.com|99.99.99.99|:8080... failed: Connection refused.
[Note that the port 8080 above is, I think, key]
I've since tried method using both file_get_contents and cURL. Similar results for all. I won't clutter this up with the code unless you ask. It's all very straightforward. [file_get_contents complains 'Connection refused' and curl_error says 'couldn't connect to host'].
With all of the methods, I'm able to grab, say, google.com AND a page from mydomain.com (default port 80), just not from port 8080.
I've set 'allow_url_fopen = on' in php.ini and in my code for good measure.
Also, the XML file that lives at 8080 is retrieved fine through a browser.
I'm hosted at GoDaddy on their "deluxe shared linux" plan.
Is there something obvious I'm missing that would allow all this to work over port 80, but not 8080?
Thanks is advance!
Greg