0
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
</head>
<body>
    <?php
    $url = 'http://www.koeri.boun.edu.tr/sismo/zeqmap/xmlt/son24saat.xml';
    $html = file_get_contents($url);

//Change encoding to UTF-8 from ISO-8859-1
    $a = iconv('ISO-8859-1', 'UTF-8//IGNORE', $html);

    print_r($a);

    ?>

</body>

ÿþ<�?xml version="1.0" encoding="ISO-8859-1" ?> <�eqlist> ...

4

1 回答 1

0

Your charset is not utf-8 but the xml encoding is.

于 2013-09-15T22:00:30.890 回答