I'm trying to make a request for a URL that contains a return on XML
with the function simplexml_load_file('url')
and I only get false
when I debug using var_dump
.
$xml = simplexml_load_file('http://www.cinemark.com.br/programacao.xml');
var_dump($xml);
Return:
bool(false)
What other method can I use to handle XML
out of this function, and what would be the "correct" application for this function?
After activating the display of errors in php, I get the following warning:
Warning: simplexml_load_file (): link : parser error: Start tag expected, '<' not found
Warning: simplexml_load_file (): ...
I think it's an encoding problem, I've tried to put the header()
function and use chatset=utf-8
but the error is shown above.
After using mb_detect_encoding
I get: "UTF-8"