✪ DeathKO ✪ | v.1098 MYKO | ASCEND | Rekor Ödül Havuzu | Büyük Academy : 06 Mart 2026 - HAZIR OL!
yasaklamak istediğin harf rakam veya herhangi bir ascii karakterleri bir değişkene ata..
$karakter= ("[ğĞÇçüÜŞşİıöÖ\\\*\/\=\'\|\<\>\+\-\_\%\$\!\;\"\?]");
Daha sonra
elseif(ereg("$karakter","$post_dan_gelen_veri") ) {
echo'Türkçe ve Ascii Kakarakter Kullanamazsınız';}
Yukardaki örnekde $post_dan_gelen_veri değişkenine register sayfanınızdaki hangi postu atadıysanız onu yazacaksınız.kolay gelsin.
Şöyle de yapılabilir
$input = $_POST['veri']; // Formdan gelen veri
$turkce = array('ğ','ş','ı','ç','ö','ü','Ğ','Ş','İ','Ç','Ö','Ü'); // Türkçe karakterler
$temiz = array('g','s','i','c','o','u','G','S','I','C','O','U'); // Düzenlenmiş karakterler
$input = str_replace($turkce,$temiz,$input); // Türkçe karakterden arındırma işlemi
<?
include ('security/antisqlinject.php');
$ganks = $_GET['ganks'];
if ($ganks == '')
{
?>
<script type="text/javascript">
function Seyap(){
// formdan verileri al
var user = document.getElementById('user').value;
// alinan verileri yolla, sonucu geri al
var sc = "user="+fc_(user);
JXP(1, "durum", "includes/acckontrol.php", sc);
}
</script>
<div align="center">
<table width="77%" border="0" cellspacing="0" cellpadding="0">
<td align="left">
<div class="registration">
<div class="textbm"><? echo ($langg['registration']); ?></div>
<form id="SexyReplay" method="post" action="index.php?page=register&ganks=ok" onsubmit="return checkform(this);">
<input type="hidden" name="hash" value=24f5bcfe46eff98b68652db0c6b43539>
<fieldset>
<legend><? echo ($langg['userinformationreg']); ?></legend>
<table width="337">
<tr>
<td width="169"><b><? echo ($langg['username']); ?>: </b>
<input type="text" title="Username" id="user" name="user" maxlength="16" style="width: 90px;" onchange="Seyap()"/></td>
<td width="156"><div id="durum"></div></td>
</tr>
</table>
<label for="passwd1"><b><? echo ($langg['password']); ?>: </b> <input type="password" title="Password" id="passwd1" name="passwd1" maxlength="12" style="width: 90px;"/></label> <br />
<label for="passwd2"><b><? echo ($langg['confirm'])." ".($langg['password']); ?> </b> <input type="password" title="Confirm Password" id="passwd2" name="passwd2" maxlength="12" style="width: 90px;"/></label> <br />
<label for="email1"><b>E-mail: </b> <input type="text" title="E-mail" id="email1" name="email1" class="email1" maxlength="40" style="width:125px;"/></label> <br />
<label for="email2"><b><? echo ($langg['confirm']); ?> E-mail: </b> <input type="text" title="Confirm E-mail" id="email2" name="email2" class="email2" maxlength="40" style="width:125px;"/></label>
</fieldset>
<br />
<fieldset>
<legend><? echo ($langg['securityinformation']); ?></legend>
<p>
<label for="Question"><b><? echo ($langg['securityquestion']); ?>: </b></label>
<select id="Question" name="Question">
<option value="1"><? echo ($langg['q1']); ?></option>
<option value="2"><? echo ($langg['q2']); ?></option>
<option value="3"><? echo ($langg['q3']); ?></option>
<option value="4"><? echo ($langg['q4']); ?></option>
<option value="5"><? echo ($langg['q5']); ?></option>
<option value="6"><? echo ($langg['q6']); ?></option>
</select>
<br />
<label for="answer"><b><? echo ($langg['securityanswer']); ?>: </b>
<input type="text" title="Security Answer" id="answer" name="answer" maxlength="40" style="width:125px;"/>
</label>
</p>
<p><img src="img.php" /> -->
<label>
<input type="text" name="sec" id="sec" />
</label>
</p>
</fieldset>
<input type="submit" id="submitButton" name="submitButton" type="submit" value="Submit" />
</form>
</div>
</td>
</table>
</center>
</td>
</tr>
</div>
<? }
elseif(ereg("$karakter","$Seyap") ) {
echo'Türkçe ve Ascii Kakarakter Kullanamazsiniz';}
else {
if ($_SESSION["scod"] <> $_POST['sec']) {
echo 'Security Errör';
}
else {
$user = $_POST['user'];
$p1 = $_POST['passwd1'];
$p2 = $_POST['passwd2'];
$e1 = $_POST['email1'];
$e2 = $_POST['email2'];
$q = $_POST['Question'];
$a = $_POST['answer'];
$usercount = odbc_exec($conn,"select count(StrAccountID) from TB_USER where StrAccountID = '".$user."'");
$ucount = odbc_result($usercount,1);
if ($user == '' or $p1 == '' or $p2 == '' or $e1 == '' or $e2 == '' or $q == '' or $a == '') {
echo ($langg['regb']);
}
elseif ($p1 <> $p2) {
echo ($langg['reqa']);
}
elseif ($e1 <> $e2) {
echo ($langg['reqe']);
}
elseif ($ucount > 0) {
echo ($langg['reqc']);
}
else {
$req = odbc_exec($conn,"insert into TB_USER (strAccountID, strPasswd, strSocNo, idays, StrEMail, Question, Answer) values ('".$user."', '".$p1."', 1, '6', '".$e1."', '".$q."', '".$a."')
") or die ($langg['sqlerror']);
echo '<center>###############################################################<BR> <BR> '.$langg['reqok'].'<br><br>###############################################################</center>';
}}
}?>
yardım edebilecek birisi varmı acabaarkadaşlar ben beceremedim eklemeyi şu sayfada skysa nın verdiği kodu nasıl kullancaz
PHP- Kodu:
<?
include ('security/antisqlinject.php');
$ganks = $_GET['ganks'];
if ($ganks == '')
{
?>
<script type="text/javascript">
function Seyap(){
// formdan verileri al
var user = document.getElementById('user').value;
// alinan verileri yolla, sonucu geri al
var sc = "user="+fc_(user);
JXP(1, "durum", "includes/acckontrol.php", sc);
}
</script>
<div align="center">
<table width="77%" border="0" cellspacing="0" cellpadding="0">
<td align="left">
<div class="registration">
<div class="textbm"><? echo ($langg['registration']); ?></div>
<form id="SexyReplay" method="post" action="index.php?page=register&ganks=ok" onsubmit="return checkform(this);">
<input type="hidden" name="hash" value=24f5bcfe46eff98b68652db0c6b43539>
<fieldset>
<legend><? echo ($langg['userinformationreg']); ?></legend>
<table width="337">
<tr>
<td width="169"><b><? echo ($langg['username']); ?>: </b>
<input type="text" title="Username" id="user" name="user" maxlength="16" style="width: 90px;" onchange="Seyap()"/></td>
<td width="156"><div id="durum"></div></td>
</tr>
</table>
<label for="passwd1"><b><? echo ($langg['password']); ?>: </b> <input type="password" title="Password" id="passwd1" name="passwd1" maxlength="12" style="width: 90px;"/></label> <br />
<label for="passwd2"><b><? echo ($langg['confirm'])." ".($langg['password']); ?> </b> <input type="password" title="Confirm Password" id="passwd2" name="passwd2" maxlength="12" style="width: 90px;"/></label> <br />
<label for="email1"><b>E-mail: </b> <input type="text" title="E-mail" id="email1" name="email1" class="email1" maxlength="40" style="width:125px;"/></label> <br />
<label for="email2"><b><? echo ($langg['confirm']); ?> E-mail: </b> <input type="text" title="Confirm E-mail" id="email2" name="email2" class="email2" maxlength="40" style="width:125px;"/></label>
</fieldset>
<br />
<fieldset>
<legend><? echo ($langg['securityinformation']); ?></legend>
<p>
<label for="Question"><b><? echo ($langg['securityquestion']); ?>: </b></label>
<select id="Question" name="Question">
<option value="1"><? echo ($langg['q1']); ?></option>
<option value="2"><? echo ($langg['q2']); ?></option>
<option value="3"><? echo ($langg['q3']); ?></option>
<option value="4"><? echo ($langg['q4']); ?></option>
<option value="5"><? echo ($langg['q5']); ?></option>
<option value="6"><? echo ($langg['q6']); ?></option>
</select>
<br />
<label for="answer"><b><? echo ($langg['securityanswer']); ?>: </b>
<input type="text" title="Security Answer" id="answer" name="answer" maxlength="40" style="width:125px;"/>
</label>
</p>
<p><img src="img.php" /> -->
<label>
<input type="text" name="sec" id="sec" />
</label>
</p>
</fieldset>
<input type="submit" id="submitButton" name="submitButton" type="submit" value="Submit" />
</form>
</div>
</td>
</table>
</center>
</td>
</tr>
</div>
<? }
elseif(ereg("$karakter","$Seyap") ) {
echo'Türkçe ve Ascii Kakarakter Kullanamazsiniz';}
else {
if ($_SESSION["scod"] <> $_POST['sec']) {
echo 'Security Errör';
}
else {
$user = $_POST['user'];
$p1 = $_POST['passwd1'];
$p2 = $_POST['passwd2'];
$e1 = $_POST['email1'];
$e2 = $_POST['email2'];
$q = $_POST['Question'];
$a = $_POST['answer'];
$usercount = odbc_exec($conn,"select count(StrAccountID) from TB_USER where StrAccountID = '".$user."'");
$ucount = odbc_result($usercount,1);
if ($user == '' or $p1 == '' or $p2 == '' or $e1 == '' or $e2 == '' or $q == '' or $a == '') {
echo ($langg['regb']);
}
elseif ($p1 <> $p2) {
echo ($langg['reqa']);
}
elseif ($e1 <> $e2) {
echo ($langg['reqe']);
}
elseif ($ucount > 0) {
echo ($langg['reqc']);
}
else {
$req = odbc_exec($conn,"insert into TB_USER (strAccountID, strPasswd, strSocNo, idays, StrEMail, Question, Answer) values ('".$user."', '".$p1."', 1, '6', '".$e1."', '".$q."', '".$a."')
") or die ($langg['sqlerror']);
echo '<center>###############################################################<BR> <BR> '.$langg['reqok'].'<br><br>###############################################################</center>';
}}
}?>
trim() ; heriki taraftan boşlukları alır
strlen(); değişekenin kaç karakterden oluştuğudur
Türkçe karakter engellemek içinde şöyle bir örnek vereyim..Örneğin formdan gelen $mesaj değişkenini filtreleyeceğiz..
$mesaj=eregi_replace("ğ","g",$mesaj);
$mesaj=eregi_replace("ı","i",$mesaj);
$mesaj=eregi_replace("ş","s",$mesaj);
şeklinde kullanabilirsin..
Kolay Gelsin