title: Parser RSS e DOMDocument::load
body: <p>I have a small problem with a script that reads an XML file and prints the output:</p>
  
  <pre><code>&lt;?php
  
    $doc = new DOMDocument();
    $doc-&gt;load("http://www.tripadvisor.it/Feeds-d235955-treviews.xml");
    foreach ($doc-&gt;getElementsByTagName('item') as $node) {
        echo $node-&gt;getElementsByTagName('title')-&gt;item(0)-&gt;nodeValue;
        echo $node-&gt;getElementsByTagName('description')-&gt;item(0)-&gt;nodeValue;
        echo $node-&gt;getElementsByTagName('link')-&gt;item(0)-&gt;nodeValue;
        echo $node-&gt;getElementsByTagName('pubDate')-&gt;item(0)-&gt;nodeValue;
    }
  
  ?&gt; 
  </code></pre>
  
  <p>If you use this script on my personal domain (hosting) it works fine, but if I use on my VPS does not work and returns these errors:</p>
  
  <pre><code>Warning: DOMDocument::load(http://www.tripadvisor.it/Feeds-d235955-treviews.xml) [domdocument.load]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/AAA/public_html/test.php on line 4
  Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity "http://www.tripadvisor.it/Feeds-d235955-treviews.xml" in /home/AAA/public_html/test.php on line 4
  </code></pre>
  
  <p>Which PHP or APACHE settings that may cause problems?</p>