Просмотр файла script2.php

Размер файла: 3.45Kb
<?php
//   ##########################################
//   #  WAP Encode 1.0                        #
//   #========================================#
//   #Разработчик: Кузнецов Андрей Николаевич #
//   #e-mail: [email protected]                #
//   #        [email protected]                    #
//   #WAP: http://mabile.nm.ru                #
//   #========================================#
//   # Copyright (c) 2003 - Mobilephone       #
//   # http://mobilephone.h11.ru              #
//   ##########################################
//параметр $files-файл, который нужно перекодировать в WML
$files = "poly.wml";
$fp = fopen($files, "r");
$soo = fread($fp, filesize($files));
$soo = str_replace("а","&#x0430;", $soo);
$soo = str_replace("б","&#x0431;", $soo);
$soo = str_replace("в","&#x0432;", $soo);
$soo = str_replace("г","&#x0433;", $soo);
$soo = str_replace("д","&#x0434;", $soo);
$soo = str_replace("е","&#x0435;", $soo);
$soo = str_replace("ж","&#x0436;", $soo);
$soo = str_replace("з","&#x0437;", $soo);
$soo = str_replace("и","&#x0438;", $soo);
$soo = str_replace("й","&#x0439;", $soo);
$soo = str_replace("к","&#x043A;", $soo);
$soo = str_replace("л","&#x043B;", $soo);
$soo = str_replace("м","&#x043C;", $soo);
$soo = str_replace("н","&#x043D;", $soo);
$soo = str_replace("о","&#x043E;", $soo);
$soo = str_replace("п","&#x043F;", $soo);
$soo = str_replace("р","&#x0440;", $soo);
$soo = str_replace("с","&#x0441;", $soo);
$soo = str_replace("т","&#x0442;", $soo);
$soo = str_replace("у","&#x0443;", $soo);
$soo = str_replace("ф","&#x0444;", $soo);
$soo = str_replace("х","&#x0445;", $soo);
$soo = str_replace("ц","&#x0446;", $soo);
$soo = str_replace("ч","&#x0447;", $soo);
$soo = str_replace("ш","&#x0448;", $soo);
$soo = str_replace("щ","&#x0449;", $soo);
$soo = str_replace("ъ","&#x044A;", $soo);
$soo = str_replace("ы","&#x044B;", $soo);
$soo = str_replace("ь","&#x044C;", $soo);
$soo = str_replace("э","&#x044D;", $soo);
$soo = str_replace("ю","&#x044E;", $soo);
$soo = str_replace("я","&#x044F;", $soo);
$soo = str_replace("А","&#x0410;", $soo);
$soo = str_replace("Б","&#x0411;", $soo);
$soo = str_replace("В","&#x0412;", $soo);
$soo = str_replace("Г","&#x0413;", $soo);
$soo = str_replace("Д","&#x0414;", $soo);
$soo = str_replace("Е","&#x0415;", $soo);
$soo = str_replace("Ж","&#x0416;", $soo);
$soo = str_replace("З","&#x0417;", $soo);
$soo = str_replace("И","&#x0418;", $soo);
$soo = str_replace("Й","&#x0419;", $soo);
$soo = str_replace("К","&#x041A;", $soo);
$soo = str_replace("Л","&#x041B;", $soo);
$soo = str_replace("М","&#x041C;", $soo);
$soo = str_replace("Н","&#x041D;", $soo);
$soo = str_replace("О","&#x041E;", $soo);
$soo = str_replace("П","&#x041F;", $soo);
$soo = str_replace("Р","&#x0420;", $soo);
$soo = str_replace("С","&#x0421;", $soo);
$soo = str_replace("Т","&#x0422;", $soo);
$soo = str_replace("У","&#x0423;", $soo);
$soo = str_replace("Ф","&#x0424;", $soo);
$soo = str_replace("Х","&#x0425;", $soo);
$soo = str_replace("Ц","&#x0426;", $soo);
$soo = str_replace("Ч","&#x0427;", $soo);
$soo = str_replace("Ш","&#x0428;", $soo);
$soo = str_replace("Щ","&#x0429;", $soo);
$soo = str_replace("Ъ","&#x042A;", $soo);
$soo = str_replace("Ы","&#x042B;", $soo);
$soo = str_replace("Ь","&#x042C;", $soo);
$soo = str_replace("Э","&#x042D;", $soo);
$soo = str_replace("Ю","&#x042E;", $soo);
$soo = str_replace("Я","&#x042F;", $soo);
fclose($fp);
$fp = fopen($files, "w");
$fw = fwrite($fp, $soo);
fclose($fp);
?>