title: file_get_contents failing
body: <p>I have a blog on tumblr, and I'm trying to access it via php and tumblrs api.</p>
  
  <p>the api endpoint is:</p>
  
  <pre><code>http://blog.example.com/api/read/json?start=0&amp;num=10&amp;debug=1
  </code></pre>
  
  <p>and that seems to work fine.</p>
  
  <p>However, when I do: </p>
  
  <pre><code>$result = file_get_contents("http://blog.example.com/api/read/json?start=0&amp;num=10&amp;debug=1");
  
  print_r($result);
  </code></pre>
  
  <p>the browser outputs</p>
  
  <pre><code>Warning:  file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /path/to/file/test.php on line 5
  
  Warning:  file_get_contents(http://blog.example.com/api/read/json?start=0&amp;num=10&amp;debug=1) [function.file-get-contents]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /path/to/file/test.php on line 5
  </code></pre>
  
  <p>This also fails with Curl.</p>
  
  <p>Ideas?</p>
  
  <p>I think this has something to do with the fact that my blog is on a subdomain. The reason I say this, is, if I run the same script on a blog located on the root url, it works fine. Is there a correct way to escape subdomains?</p>