php curl xml 파싱 문의드립니다.
본문
curl을 이용해 외부 xml을 파싱해오는데 (xml 인코딩은 utf-8)
PHP Warning: simplexml_load_string(): encoder errorEntity: line 236620:
에러가 떠서 확인해보니 한글 오타 "햬" 라는 문자열 때문에 수집 에러가 났습니다.
이런경우 iconv 해봐도 안되고 어떤 방식으로 호출해야하나요?
답변 1
https://stackoverflow.com/questions/2850698/php-simplexml-entities
$string = html_entity_decode($string, ENT_QUOTES, "utf-8");
답변을 작성하시기 전에 로그인 해주세요.