title: failed to load external entity ""
body: <p>Basically this is a search bar and I take the searched for term and put it in the api call url, however i'm getting </p>
  
  <blockquote>
    <p>Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity ""</p>
  </blockquote>
  
  <p>any ideas?</p>
  
  <p>code:</p>
  
  <pre><code>if (!empty($_POST['searchbird'])){
      $searchbird=rawurlencode($_POST['searchbird']);
      $searchCode = "http://ebird.org/ws1.1/data/obs/region_spp/recent?rtype=subnational2&amp;r=US-AZ-013&amp;sci=$searchbird";
      $url_headers = @get_headers($searchCode);
  
      if($url_headers[0] == 'HTTP/1.1 200 OK') {
          $xml = simplexml_load_file($url);
  
          print_r($xml);
  
      } else {
          // Error
          echo $searchCode;
          print_r($url_headers);
          exit("failed to load XML");
      }
  
  
  } else {
      $searchbird = '';
      $form = "&lt;form method='post'&gt;
         &lt;strong&gt;Enter the name of a Bird&lt;/strong&gt;
         &lt;input type='text' name='searchbird' value='$searchbird' /&gt;
         &lt;input type='submit' name='submit' value='submit' /&gt;
      &lt;/form&gt;";
      echo $form;
  }
  </code></pre>