title: file_get_contents not working - connection refused
body: <p>After reading the following links:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/11363022/get-url-content-php">get url content PHP</a></li>
  <li><a href="https://stackoverflow.com/questions/28450386/file-get-contents-failed-to-open-stream-connection-refused-godaddy-server-with">file_get_contents failed to open stream: Connection refused godaddy server with remote connection server</a></li>
  <li><a href="https://stackoverflow.com/questions/697472/php-file-get-contents-returns-failed-to-open-stream-http-request-failed">PHP file_get_contents() returns &quot;failed to open stream: HTTP request failed!&quot;</a></li>
  </ul>
  
  <p>I'm having a problem with the function <code>file_get_contents</code> or even <code>curl</code> in one of my servers at hostgator, they are not working, returning the PHP error <code>failed to open stream: Connection refused</code>. I've tried cURL with <code>USERAGENT</code> set with no result too. It's a simple weather service that I'm creating, it returns the altitude, wind direction, speed and temperature on a certain coordinate of the globe.</p>
  
  <p>Return sample: <code>30000;221;2;-32;1;</code></p>
  
  <p>In the other side (request side), I have a web server running IIS 7.5, with all router firewalls, computers firewalls and antivirus softwares disabled only for testing, and is still refusing the connection ONLY for the hostgator servers. <strong>I've tried the same code in other web hosting providers, and the code is working properly.</strong></p>
  
  <p>This service will handle a lot of requests per minute, and this seems to me that <strong>something has blocked my connection between hostgator and my server</strong> due to the number of requests. But I don't know where!!</p>
  
  <p>The page is perfectly accesible via browser.</p>
  
  <p>This is my enviorioment at the hostgator side:</p>
  
  <ul>
  <li>allow_url_fopen: On</li>
  <li>allow_url_include: On</li>
  <li>OpenSSL: Enabled</li>
  </ul>
  
  <p>Here is my PHP code:</p>
  
  <pre><code>$datalink = "http://#####.########.###:8280/weather.php?waypoint_lat=-10.981925&amp;waypoint_lon=-37.077377&amp;altitude=30000";
  
  $weather_layer = file_get_contents($datalink);
  
  echo "Layer ($datalink):" .$weather_layer."&lt;br&gt;";
  </code></pre>