title: PHP file_get_contents($url) slow performance
body: <p>My web page uses Google charts to produce five graphs.  If the graphs are not already cached, I have the following line of code that retrieves the image.</p>
  
  <p>$image = file_get_contents("<a href="http://chart.apis.google.com/chart" rel="nofollow noreferrer">http://chart.apis.google.com/chart</a>?".$query);</p>
  
  <p>When that code is executed in a loop, it takes 10 seconds to get each image.  But, if I change the code as to use one of Google's ip addresses instead of the url:</p>
  
  <p>$image = file_get_contents("<a href="http://74.125.93.100/chart" rel="nofollow noreferrer">http://74.125.93.100/chart</a>?".$query);</p>
  
  <p>It takes less than one second to retrieve the images.  So my initial thought was that DNS is not resolving the URL and the delay is from cycling through the assigned DNS servers?  So I tried to ping chart.apis.google.com from the server and it immediately returned a reasonable response.</p>
  
  <p>So my question is: Is there any PHP (or Apache2) configuration setting that I may be overlooking that may cause this delay, or does this sound like a server configuration issue?</p>