【PHP】Big5 to Unicode


本來想用 Perl 寫, 可惜 Text::Iconv 還要裝, 所以改用現成的 PHP 來做.

<?
$url = "http://www.xxx.com/index.html";
$contents = file_get_contents($url);
//如果出現中文亂碼使用下面代碼
//$getcontent = iconv("big5", "utf-8",file_get_contents($url));
//echo $getcontent;
echo $contents;
?>

參考

 

Ed32. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com