ASCII Karkater Çeviri Fonksiyonu

tarantula90102.03.2010 - 18:58
ASCII Karkater Çeviri Fonksiyonu
Kod: [Seç]
<?
function ASCII($Str) {
//Türkçe Karakterler için
$Str = str_replace("İ","&#304;",$Str);$Str = str_replace("ı","&#305;",$Str);
$Str = str_replace("Ö","&#214;",$Str);$Str = str_replace("ö","&#246;",$Str);
$Str = str_replace("Ü","&#220;",$Str);$Str = str_replace("ü","&#252;",$Str);
$Str = str_replace("Ç","&#199;",$Str);$Str = str_replace("ç","&#231;",$Str);
$Str = str_replace("Ğ","&#286;",$Str);$Str = str_replace("ğ","&#287;",$Str);
$Str = str_replace("Ş","&#350;",$Str);$Str = str_replace("ş","&#351;",$Str);
//Tüm Karakterler
$Str = str_replace("£","&#8356;",$Str);$Str = str_replace("!","&#033;",$Str);
$Str = str_replace("\"","&#034;",$Str);$Str = str_replace("#","&#035;",$Str);
$Str = str_replace("$","&#036;",$Str);$Str = str_replace("%","&#037;",$Str);
$Str = str_replace("&","&#038;",$Str);$Str = str_replace("'","&#039;",$Str);


$Str = str_replace("(","&#040;",$Str);$Str = str_replace(")","&#041;",$Str);
$Str = str_replace("*","&#042;",$Str);$Str = str_replace("+","&#043;",$Str);
$Str = str_replace(",","&#044;",$Str);$Str = str_replace("-","&#045;",$Str);
$Str = str_replace(".","&#046;",$Str);$Str = str_replace("/","&#047;",$Str);
$Str = str_replace("0","&#048;",$Str);$Str = str_replace("1","&#049;",$Str);
$Str = str_replace("2","&#050;",$Str);$Str = str_replace("3","&#051;",$Str);
$Str = str_replace("4","&#052;",$Str);$Str = str_replace("5","&#053;",$Str);
$Str = str_replace("6","&#054;",$Str);$Str = str_replace("7","&#055;",$Str);
$Str = str_replace("8","&#056;",$Str);$Str = str_replace("9","&#057;",$Str);
$Str = str_replace(":","&#058;",$Str);$Str = str_replace(";","&#059;",$Str);
$Str = str_replace("<","&#060;",$Str);$Str = str_replace("=","&#061;",$Str);
$Str = str_replace(">","&#062;",$Str);$Str = str_replace("?","&#063;",$Str);
$Str = str_replace("@","&#064;",$Str);$Str = str_replace("[","&#091;",$Str);
$Str = str_replace("\\","&#092;",$Str);$Str = str_replace("]","&#093;",$Str);
$Str = str_replace("^","&#094;",$Str);$Str = str_replace("_","&#095;",$Str);
$Str = str_replace("`","&#096;",$Str);$Str = str_replace("{","&#0123;",$Str);
$Str = str_replace("|","&#0124;",$Str);$Str = str_replace("}","&#0125;",$Str);
$Str = str_replace("~","&#0126;",$Str);$Str = str_replace(" ","&#0160;",$Str);
$Str = str_replace("¡","&#0161;",$Str);$Str = str_replace("Ñ","&#0209;",$Str);
$Str = str_replace("¢","&#0162;",$Str);$Str = str_replace("£","&#0163;",$Str);
$Str = str_replace("¤","&#0164;",$Str);$Str = str_replace("¥","&#0165;",$Str);
$Str = str_replace("¦","&#0166;",$Str);$Str = str_replace("§","&#0167;",$Str);
$Str = str_replace("¨","&#0168;",$Str);$Str = str_replace("©","&#0169;",$Str);
$Str = str_replace("ª","&#0170;",$Str);$Str = str_replace("«","&#0171;",$Str);
$Str = str_replace("¬","&#0172;",$Str);$Str = str_replace(" ","&#0173;",$Str);
$Str = str_replace("®","&#0174;",$Str);$Str = str_replace("¯","&#0175;",$Str);
$Str = str_replace("°","&#0176;",$Str);$Str = str_replace("±","&#0177;",$Str);
$Str = str_replace("²","&#0178;",$Str);$Str = str_replace("³","&#0179;",$Str);
$Str = str_replace("´","&#0180;",$Str);$Str = str_replace("µ","&#0181;",$Str);
$Str = str_replace("¶","&#0182;",$Str);$Str = str_replace("·","&#0183;",$Str);
$Str = str_replace("¸","&#0184;",$Str);$Str = str_replace("¹","&#0185;",$Str);
$Str = str_replace("º","&#0186;",$Str);$Str = str_replace("»","&#0187;",$Str);
$Str = str_replace("¼","&#0188;",$Str);$Str = str_replace("½","&#0189;",$Str);
$Str = str_replace("¾","&#0190;",$Str);$Str = str_replace("¿","&#0191;",$Str);
$Str = str_replace("À","&#0192;",$Str);$Str = str_replace("Á","&#0193;",$Str);
$Str = str_replace("Â","&#0194;",$Str);$Str = str_replace("Ã","&#0195;",$Str);
$Str = str_replace("Ä","&#0196;",$Str);$Str = str_replace("Å","&#0197;",$Str);
$Str = str_replace("Æ","&#0198;",$Str);$Str = str_replace("Ç","&#0199;",$Str);
$Str = str_replace("È","&#0200;",$Str);$Str = str_replace("É","&#0201;",$Str);
$Str = str_replace("Ê","&#0202;",$Str);$Str = str_replace("Ë","&#0203;",$Str);
$Str = str_replace("Ì","&#0204;",$Str);$Str = str_replace("Í","&#0205;",$Str);
$Str = str_replace("Î","&#0206;",$Str);$Str = str_replace("Ï","&#0207;",$Str);
$Str = str_replace("Ò","&#0210;",$Str);$Str = str_replace("Ó","&#0211;",$Str);
$Str = str_replace("Ô","&#0212;",$Str);$Str = str_replace("Õ","&#0213;",$Str);
$Str = str_replace("Ö","&#0214;",$Str);$Str = str_replace("×","&#0215;",$Str);
$Str = str_replace("Ø","&#0216;",$Str);$Str = str_replace("Ù","&#0217;",$Str);
$Str = str_replace("Ú","&#0218;",$Str);$Str = str_replace("Û","&#0219;",$Str);
$Str = str_replace("Ü","&#0220;",$Str);$Str = str_replace("ß","&#0223;",$Str);
$Str = str_replace("à","&#0224;",$Str);$Str = str_replace("á","&#0225;",$Str);
$Str = str_replace("â","&#0226;",$Str);$Str = str_replace("ã","&#0227;",$Str);
$Str = str_replace("ä","&#0228;",$Str);$Str = str_replace("å","&#0229;",$Str);
$Str = str_replace("æ","&#0230;",$Str);$Str = str_replace("ç","&#0231;",$Str);
$Str = str_replace("è","&#0232;",$Str);$Str = str_replace("é","&#0233;",$Str);
$Str = str_replace("ê","&#0234;",$Str);$Str = str_replace("ë","&#0235;",$Str);
$Str = str_replace("ì","&#0236;",$Str);$Str = str_replace("í","&#0237;",$Str);
$Str = str_replace("î","&#0238;",$Str);$Str = str_replace("ï","&#0239;",$Str);
$Str = str_replace("ñ","&#0241;",$Str);$Str = str_replace("ü","&#0252;",$Str);
$Str = str_replace("ò","&#0242;",$Str);$Str = str_replace("ó","&#0243;",$Str);
$Str = str_replace("ô","&#0244;",$Str);$Str = str_replace("õ","&#0245;",$Str);
$Str = str_replace("ö","&#0246;",$Str);$Str = str_replace("÷","&#0247;",$Str);
$Str = str_replace("ø","&#0248;",$Str);$Str = str_replace("ù","&#0249;",$Str);
$Str = str_replace("ú","&#0250;",$Str);$Str = str_replace("û","&#0251;",$Str);
$Str = str_replace("ÿ","&#0255;",$Str);
return $Str;
}
?>
Writed by FKA


Linkback: https://www.buyuknet.com/ascii-karkater-ceviri-fonksiyonu-t21128.0.html

Etiket:
ASCII Karkater Çeviri Fonksiyonu 

Bu bilgi size yardimci oldu mu?

EvetHayır
ASCII Karkater Çeviri Fonksiyonu
ASCII Karkater Çeviri Fonksiyonu
(Ortalama: 5 üzerinden 2.5 - 2 Oy)
2