title: PHP error: php_network_getaddresses: getaddrinfo failed: (while getting information from other site.)
body: <p>Trying to get information from an external source, I'm receiving the following error:</p>
  
  <blockquote>
    <p><strong>Warning</strong>: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in line #...</p>
  </blockquote>
  
  <p>Yesterday everything was fine, so what happened to this script, which is not working and gives me the error above? Any solution or hint to solve this problem?</p>
  
  <pre><code>$uri = "http://api.hostip.info/?ip=$ip&amp;position=true";
  
  $dom-&gt;load($uri);
  </code></pre>
  
  <p>I also tried by converting DNS to IP but then I get the warning: <code>failed to open</code></p>
  
  <pre><code>$uri = "174.129.200.54/?ip=$ip&amp;position=true";
  </code></pre>
  
  <p>I tried to remove the <code>http</code> but am still getting the above error.</p>