I'm trying to use data returned from a cURL request, the page returned is xml. When I try and load the returned data with simplexml_load_file I get the error saying simplexml does not recognize the file.
The error:
This is the xml response from curl:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response><results><![CDATA[An error occured %s]]></results><status><![CDATA[]]></status></response>
Here is a snippet of my code:
curl_setopt($ch, CURLOPT_URL,
'myurl');
$result = curl_exec($ch);
curl_close($ch);
$xml = simplexml_load_file($result);
(not the whole code, don't worry the cURL part works fine)
Is there something special I have to do when trying to use data from a cURL request?