title: Parsing xml with php and curl - Expedia API
body: <p>I'm wanting to extract some data from an API call I have made. Using PHP CURL.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    &lt;?PHP
      //use latest minorRev 14
      $url  ='http://api.ean.com/ean-services/rs/hotel/v3/list?minorRev=99';
      $url .= '&amp;apiKey=' . $apiKey;
      $url .= '&amp;cid=55505';
      $url .= '&amp;locale=en_US&amp;city=Dallas&amp;stateProvinceCode=TX&amp;countryCode=US&amp;numberOfResults=3';
      $url .= '&amp;searchRadius=50';
      //using the cache returns results much faster
      $url .= '&amp;supplierCacheTolerance=MED_ENHANCED';
      //dates and occupancy
      $url .='&amp;arrivalDate=09/04/2014&amp;departureDate=09/05/2014&amp;room1=2';
      $header[] = "Accept: application/json";
      $header[] = "Accept-Encoding: gzip";
      $ch = curl_init();
      curl_setopt( $ch, CURLOPT_HTTPHEADER, $header );
      curl_setopt($ch,CURLOPT_ENCODING , "gzip");
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
      curl_setopt( $ch, CURLOPT_URL, $url );
      curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
      $response = json_decode(curl_exec($ch));
      $response = curl_exec($ch);
  
      ?&gt;
      &lt;html&gt;
      &lt;body&gt;
          &lt;table&gt;
              &lt;Tr&gt;
                  &lt;TD&gt;
  
                      &lt;?PHP
  
                      $hotels = simplexml_load_file('http://api.ean.com/ean-services/rs/hotel/v3/list?minorRev=99&amp;apiKey=7z6tduachrht362dpnsch34v&amp;cid=55505&amp;locale=en_US&amp;city=Dallas&amp;stateProvinceCode=TX&amp;countryCode=US&amp;numberOfResults=3&amp;searchRadius=50&amp;supplierCacheTolerance=MED_ENHANCED&amp;arrivalDate=09/04/2014&amp;departureDate=09/05/2014&amp;room1=2');
  
                      echo $hotels;
  
                      ?&gt;
  
  
                  &lt;/TD&gt;
              &lt;/Tr&gt;
          &lt;/table&gt;
  </code></pre>
  
  <p>Why am I not getting anything returned by using the simplexml_load_file function? </p>
  
  <p>I was also following this as a guide - <a href="http://blog.teamtreehouse.com/how-to-parse-xml-with-php5" rel="nofollow">http://blog.teamtreehouse.com/how-to-parse-xml-with-php5</a></p>