title: Issue in getting data using CURL
body: <p>I am sending request to API using CURL, but not able to get request. The API works well when you call it directly in browser.</p>
  
  <p>Here is the link </p>
  
  <pre><code>http://api.ean.com/ean-services/rs/hotel/v3/info?cid=55505&amp;minorRev=99&amp;apiKey=5d9cp7nfxruc7p788fvvqpwn&amp;locale=en_US&amp;currencyCode=USD&amp;hotelId=123912
  </code></pre>
  
  <p>my CURL code is here</p>
  
  <pre><code>  $post_string1 = "cid=55505&amp;minorRev=99&amp;apiKey=5d9cp7nfxruc7p788fvvqpwn&amp;locale=en_US&amp;currencyCode=USD&amp;type=xml&amp;hotelId=123912";  
  
    $path1 = "http://api.ean.com/ean-services/rs/hotel/v3/info"; //Relative path to the file with $_POST parsing
  
  $ch1 = curl_init($path1); 
  $fp1 = fopen('hotel.xml','w');
  curl_setopt($ch1, CURLOPT_POSTFIELDS, $post_string1); //Send the data to the file
  curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch1, CURLOPT_HTTPHEADER, array('Accept: application/xml')); 
  curl_setopt($ch1, CURLOPT_HEADER, 0);
  curl_setopt($ch1, CURLOPT_FILE, $fp1);
  $val = curl_exec($ch1);
  $info = curl_getinfo($ch1);
  curl_close($ch1);//Close curl session
  fclose($fp1); //Close file overwrite
  
  //$hotel = simplexml_load_file('hotel.xml');
  
  echo '&lt;pre&gt;';print_r($info); 
  </code></pre>
  
  <p>I get http 405 code. Please advice what i am doing wrong.</p>