A few days ago, I used *** xml to parse an rss data source, and it was easy to get the desired results. I don't want to start to report the following error in a few days: Warning: *** xml_load_file () [function. * ** xml-load-file]: inputconversionfailedduetoinputerror, bytes0xAD0
A few days ago, I used *** xml to parse an rss data source, and it was easy to get the desired results. I don't want to start to report an error in a few days:
Warning: *** xml_load_file () [function. *** xml-load-file]: input conversion failed due to input error, bytes 0xAD 0xB5 0x3C 0x2F
At the beginning, it was expected to be a bug in php5, but the search invention may be that the rss source contains a mixture of other encoding characters, resulting in *** xml parsing error.
That is to say, if the rss statement is like this:
Plain textxml:
So the rss content must be gb2312.
Solution
Iconv conversion encoding
Corrected encoding to accurate encoding.