logo

PHP Türkçe ASCII Yapma Fonksiyonu

logo

bu kod türkçe yazılan kodları UTF-8 arayüzünde düzgün göstermenizi sağlar
türkçe dilleri (iso-8859-9) ları veya ANSI leri UTF-8 e uygun hale çevirir metnin karakter kodlamasınım değiştirmeden

işime yarıyor baya, umarım sizin de işinize yarar
buyrun:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
 
//if(!iSUPERADMIN && $userdata['user_id']!=1) { redirect (BASEDIR."index.php"); }
function trascii($text) {
	$search = array("Ç", "İ", "Ğ", "Ö", "Ş", "Ü", "ç", "ı", "ğ", "ö", "ş", "ü");
	$replace = array("&#199;", "&#304;", "&#286;", "&#214;", "&#350;", "&#220;", "&#231;", "&#305;", "&#287;", "&#246;", "&#351;", "&#252;");
	$text = str_replace($search, $replace, $text);
	return $text;
}
 
// Strip Input Function, prevents HTML in unwanted places
//fusiondan alıntı bu fonktison
function stripinput($text) {
	if (QUOTES_GPC) $text = stripslashes($text);
	$search = array("&", "\"", "'", "\\", '\"', "\'", "<", ">", "&nbsp;");
	$replace = array("&amp;", "&quot;", "&#39;", "&#92;", "&quot;", "&#39;", "&lt;", "&gt;", " ");
	$text = str_replace($search, $replace, $text);
	return $text;
}
 
$text='';//ilk değer boş
 
if (isset($_POST['gonder'])) {
	$text=$_POST['veri']; //geri döndermek için ayrıca
		echo "<div style='margin: 0px auto; padding-bottom: 15px;'>";
		echo "çıktısı:<br /><textarea rows='3' cols='50'>".stripinput(trascii($text));
		echo "</textarea></div>";
}
 
echo "<div style='margin: 0px auto;'>";
echo "<form name='inputform' method='post' action='".$_SERVER['PHP_SELF']."'>";
echo "<textarea name='veri' rows='3' cols='50' class='textbox'>".$text."</textarea><br />";
echo "<input type='submit' name='gonder' value='ascii yap' />";
echo "</form>";
echo "</div>";
 
?>

Download Link:
Download Link

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
  • Ellerine sağlık kardeşim! :) Süpərsin!
  • teşekkürler :)
  • Bu kodları nasıl kullanabileceğimizi tam anlıyamadım ben,önizlememi yaptırıyoz,bir dosya olarak kaydedip bi yere mi atıyoz,yoksa blok olarak mı ekliyoz..
  • admin
    sadece bir fonksiyon bu, ben sayfa şeklinde hazırladım, içindeki fonksiyon önemli olan kısım.
    sayfa olarak ekleyip çalıştırınca php destekli bir sunucuda çalışacaktır
blog comments powered by Disqus
logo
logo
Powered by Wordpress | Designed by Elegant Themes