Tuesday, June 09, 2009

Time-out when calling file_get_contents on PHP scripts hosted on Godaddy accounts

I noticed that if you're using a Godaddy shared web hosting plan you're limited to calling file_get_contents only on URLs that use the standard HTTP port 80

It may be a firewall rule that they have in place.

So if you have an url like http://app.example.com:8080/do?param=value, 

the call to file_get_contents will hang and eventually timeout, 

even if the same url is accessible directly from within a browser.

If you control the called web component you may be able to change it 

so that it would listen on the standard port 80.

No comments: