Simplexml_load_string() fehl parse error

Ich versuche zu laden, analysiert der Google Wetter API-Antwort (Chinesisch Reaktion).

Hier ist der API-Aufruf.

//This code fails with the following error
$xml = simplexml_load_file('http://www.google.com/ig/api?weather=11791&hl=zh-CN');

( ! Warnung ) Warning: simplexml_load_string()
[Funktion.simplexml-load-string]:
Entity: line 1: parser error : Input
is not proper UTF-8, indicate encoding
! Bytes: 0xB6 0xD4 0xE0 0xC6 in
C:\htdocs\weather.php in Zeile 11

Warum laden diese Antwort nicht?

Wie muss ich enkodieren/Dekodieren, die Antwort, so dass simplexml lädt es richtig?

Edit: Hier ist der code und die Ausgabe.

<?php
$googleData = file_get_contents('http://www.google.com/ig/api?weather=11102&hl=zh-CN');
$xml = simplexml_load_string($googleData);

( ! Warnung ) Warning: simplexml_load_string()
[Funktion.simplexml-load-string]:
Entity: line 1: parser error : Input
is not proper UTF-8, indicate encoding
! Bytes: 0xB6 0xD4 0xE0 0xC6 in
C:\htdocs\test4.php auf der Linie 3 Nennen
Stack
Time Memory Function Location 1 0.0020 314264 {main}(
) ..\test4.php:0
2 0.1535 317520 simplexml_load_string
( string(1364) ) ..\test4.php:3

( ! Warnung ) Warning: simplexml_load_string()
[Funktion.simplexml-load-string]:
t_system
data="SI"/>

( ! Warnung ) Warning: simplexml_load_string()
[Funktion.simplexml-load-string]: ^ in
C:\htdocs\test4.php auf der Linie 3 Nennen
Stack
Time Memory Function Location 1 0.0020 314264 {main}(
) ..\test4.php:0
2 0.1535 317520 simplexml_load_string
( string(1364) ) ..\test4.php:3

Schreibe einen Kommentar