Нужно спарсить xml файл. Делаю примерно таким образом:
$xml = simplexml_load_file('http://www.cbr.ru/scripts/XML_daily.asp?date_req=02/03/2002');
$xml = new SimpleXMLElement($xml);
А вот, что получаю в итоге:
Warning: SimpleXMLElement::__construct(): Entity: line 19: parser error : Start tag expected, '<' not found in C:\OpenServer\domains\mvc-test\app\index.php on line 12
Warning: SimpleXMLElement::__construct(): in C:\OpenServer\domains\mvc-test\app\index.php on line 12
Warning: SimpleXMLElement::__construct(): ^ in C:\penServer\domains\mvc-test\app\index.php on line 12
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in C:\OpenServer\domains\mvc-test\app\index.php:12 Stack trace: #0 C:\OpenServer\domains\mvc-test\app\index.php(12): SimpleXMLElement->__construct('\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n...') #1 {main} thrown in C:\OpenServer\domains\mvc-test\app\index.php on line 12