リモートWebisteのタイトルを取得する場合は、次のスクリプトを使用します。
function get_remotetitle($urlpage) {
$file = @fopen(($urlpage),"r");
$text = fread($file,16384);
if (preg_match('/<title>(.*?)<\/title>/is',$text,$found)) {
$title = $found[1];
} else {
$title = 'Title N/A';
}
return $title;
}
しかし、アクセント付きのWebisteタイトルをパレードすると、「�」が表示されます。しかし、PHPMyAdminを見ると、アクセントが正しく表示されています。何が起こっていますか?