New to working with XML in PHP. The following example, which was given as a solution to a prior question of a similar issue, is supposed to be working correctly. I'm not having any PHP errors come up upon loading the page, however, I am not seeing anything being displayed (the array). Been looking at example after example and can't for the life of me figure this out. I'm wondering if PHP is seeing that maybe the URL could be taking a little bit to load and is not waiting long enough?
$context = stream_context_create(array('http' => array('header' => 'Accept: application/xml')));
$url = 'http://api.ean.com/ean-services/rs/hotel/v3/list?cid=55505&minorRev=12& apiKey=2hkhej72gxyas3ky6hhjtsga&locale=en_US¤cyCode=USD&customerIpAddress=10.184.2.9&customerSessionId=&xml=<HotelListRequest><arrivalDate>01/22/2012</arrivalDate><departureDate>01/24/2012</departureDate><RoomGroup><Room><numberOfAdults>1</numberOfAdults><numberOfChildren>1</numberOfChildren><childAges>4</childAges></Room></RoomGroup><city>Amsterdam</city><countryCode>NL</countryCode><supplierCacheTolerance>MED</supplierCacheTolerance></HotelListRequest> ';
$xml = file_get_contents($url, false, $context);
$xml = simplexml_load_string($xml);
print_r($xml);
Any feedback would be great. Thanks!
Matt