title: Simple XML Load File not working
body: <p>how come this isn't working:</p>
  
  <pre><code>$url = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20xpath%3D%22%2F%2Fmeta%22%20and%20url%3D%22http://www.cnn.com%22&amp;format=xml&amp;diagnostics=false";
  
  $xml = (simplexml_load_file($url))
  </code></pre>
  
  <p>I get multiple errors telling me the HTTP request failed. Ultimately I want to get the results from this file into an array eg</p>
  
  <p>Description = CNN.com delivers the latest breaking news etc.</p>
  
  <p>Keywords = CNN, CNN news, CNN.com, CNN TV etc.</p>
  
  <p>But this initial stage isn't working. Any help please?</p>
  
  <p><strong>EDIT</strong>
  Additional information:</p>
  
  <p>Errors:</p>
  
  <pre>warning: simplexml_load_file(http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20xpath%3D%22//meta%22%20and%20url%3D%22http://www.cnn.com%22&format=xml&diagnostics=false) [function.simplexml-load-file]: failed to open stream: HTTP request failed!
  # warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20xpath%3D%22//meta%22%20and%20url%3D%22http://www.cnn.com%22&format=xml&diagnostics=false" </pre>
  
  <ul>
  <li>From my phpinfo():
  allow_url_fopen  On  On </li>
  <li>PHP version 5.2.11 </li>
  <li>Think it's valid (<a href="http://query.yahooapis.com/v1/public/yql?q=select%20" rel="nofollow noreferrer">http://query.yahooapis.com/v1/public/yql?q=select%20</a>*%20from%20html%20where%20xpath%3D%22//meta%22%20and%20url%3D%22http://www.cnn.com%22&amp;format=xml&amp;diagnostics=false)</li>
  </ul>