Codice PHP:
<?php 
function create_xml(){  
    
$request='<HotelListRequest> 
    <city>Seattle</city> 
    <arrivalDate>12/12/2011</arrivalDate> 
    <departureDate>12/23/2011</departureDate> 
    <RoomGroup> 
      <Room> 
        <numberOfAdults>1</numberOfAdults> 
      </Room> 
    </RoomGroup> 
    </HotelListRequest>'

    return 
$request

$a create_xml(); 

$cid='55505'
$apikey='cbrzfta369qwyrm9t5b8y8kf';      
$user_ip=$_SERVER['REMOTE_ADDR'];       
$user=$_SERVER['HTTP_USER_AGENT'];                  
$url='http://api.ean.com/ean-services/rs/hotel/v3/list?'
$dati_post='cid=' $cid '&minorRev=9&apiKey=' $apikey '&locale=it_IT&currencyCode=EUR&customerSessionId=&xml=' $a

?> 
[url="<?php echo $url; echo $dati_post?>"]link[/url]

 
<?php 
$curl 
curl_init();       
curl_setopt($curl,CURLOPT_URL$url);  
curl_setopt($curl,CURLOPT_POSTtrue); 
curl_setopt($curl,CURLOPT_POSTFIELDS$dati_post);     
curl_setopt($curl,CURLOPT_HTTPHEADER,array('Content-type:application/x-www-form-urlencoded'));  
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);       
curl_setopt($curl,CURLOPT_TIMEOUT,200);             

$output curl_exec($curl);       

curl_close($curl); 

//$xml = new SimpleXMLElement(file_get_contents($output), NULL, TRUE);
$xmlstr file_get_contents($output);
$test=html_entity_decode($xmlstr);
$a simplexml_load_string($test); 
//$sitemap = new SimpleXMLElement($xmlstr);

//print_r($a);  
//echo  $output; 
var_dump($a);  
foreach(
$a->HotelList->HotelSummary as $hotel){
    
vardump($hotel);
}
/*$p = $a->customerSessionId;
var_dump($p);*/
?>
non stampa cio che mi aspetto ;(