Created
March 11, 2011 18:25
-
-
Save shinout/866322 to your computer and use it in GitHub Desktop.
GoogleサイトのページをSJISに変換するコード。災害まとめページを家族のケータイからも閲覧してもらえるように作った。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = ""; // ここにgoogle siteのURLをかきます。例: $url = "http://sites.google.com/site/suzukisaigai/"; | |
$a="SHIFT_JIS"; | |
$b="text/html; charset=$a"; | |
header("Content-Type:$b"); | |
echo preg_replace("/ead>/","ead><meta http-equiv=Content-Type content='$b'>", mb_convert_encoding(file_get_contents($url), $a, "UTF-8")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment