I'm grabbing some XML from a URL using CURL in PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$base_xml = curl_exec($ch);
curl_close($ch);
When I view the link in a browser, the XML displays fine and is valid. However when I view the source of the CURL ($base_xml) it is not valid XML as an additional '1' character has been added to the end of the XML so I'm getting a
Extra content at the end of the document in
error when trying to parse the XML using PHP XMLReader
Why would this be and how can I resolve this?
Thanks in advance