When I'm trying to use simplexml_load_string
it returns an array of "SIMPLE XML objects" with some "Empty" object attributes. Actually those attributes are not empty in the real XML output!
Do you have any suggestions?
$url = "widgets.sportsevents365.com/data/tickets/v2.0/events/?q=cq,0,$sportType,$numOfDays&page=$page&perpage=$perpage";
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER ,array('Contect-Type:text/xml','application/xml') );
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERPWD, "*****:*****");
$result = curl_exec($ch);
curl_close($ch);
$xmldata = simplexml_load_string($result);
print_r( $xmldata );