Simplexml_load_string() fail to parse error

后端 未结 5 1983
眼角桃花
眼角桃花 2020-12-03 08:53

I\'m trying to load parse a Google Weather API response (Chinese response).

Here is the API call.

// This code fails with the following error
$xml =          


        
5条回答
  •  南方客
    南方客 (楼主)
    2020-12-03 09:38

    Try to add in the url query parameter eo = utf-8. In this case, the answer will be exclusively the UTF-8 encoding. It helped me.

    http://www.google.com/ig/api?weather=?????°ree=??????&oe=utf-8&hl=es
    

提交回复
热议问题