script Güvenlik sorunu varmı?.

koleheahmet alkaya

Kodlamada güvenlikle ilgili sorun varmıdır,ayrıca mail yollamıyor neden olabilir?

<head>

<?php

/*


ÖDEME

*/

$mailadresi = "[email protected]";

$mail = $_POST['Email'];
$porukaa = $_POST['Message'];
$poruka = str_replace("\r", '<br />', $porukaa);

$thanks = "
<p align='left'><br>
Ödeme bilgileriniz yetkili kiiye yollanmtr.";

if($_POST['submitform'])
{

    $Name = $_POST['Name'];
    $Telefon = $_POST['Telefon'];
    $banka = $_POST['banka'];
    $siparis = $_POST['siparis'];
    $Email = $_POST['Email'];
    $Message = $_POST['Message'];
    $require = $_POST['require'];
    $browser = $HTTP_USER_AGENT;
    $ip = $_SERVER['REMOTE_ADDR'];

    $dcheck = explode(",",$require);
    while(list($check) = each($dcheck))
    {
        if(!$$dcheck[$check]) {
        $error .= "";
        }
    }
    if ((!ereg(".+\@.+\..+", $Email)) || (!ereg("^[[email protected]]+$", $Email))){
    $error .= "Yanlis Email.<br>Verdiginiz E-mail adresi <b>$Email</b> geçerli degil.";
    }
    if($error)
    {
    echo $error;
    echo '';
    }
    else
    {

$message = "

Adnz Soyadnz: $Name

Telefon: $Telefon

Banka: $banka

lem  Numaras: $islem

Char ID :$CharID

Char Username:$Charusername

E-mail: $Email

Notunuz: $Message

-----------------------------
Browser: $browser
IP: $ip
";

$subject = "Ödeme Bildirim Formu";

$subject2 = "Ödeme Bildirim Formu/Kopyas";

$message2 = "Ödeme Bildirim Formu Detaylar:

-----------------------------
Adnz Soyadnz: $Name

Telefon: $Telefon

Banka: $banka

Oyun: $oyun

Sipari Numaras: $siparis

E-mail: $Email

Notunuz: $Message
-----------------------------
";


mail($mailadresi,"$subject","$message","From: $Name <$Email>");
mail($Email,"$subject2","$message2","From: <$mailadresi>");
echo "$thanks";
    }
}
else{

echo '
<form name="contactform" action="'.$PHP_SELF.'" method="post">
<input type="hidden" name="require" value="Name,Email,Message">
  <table width="444" align="center" height="285">
    <tr>
      <td colspan="2" align="center" class="fonlu" height="1">
      <p></td>
    </tr>
    <tr>
      <td align="right" valign="top" class="fonlu" height="19">
        <font face="Century Gothic" style="font-size: 9pt">Adnz
      Soyadnz</font></td>
      <td valign="top" class="fonlu" height="19">
        <font face="Century Gothic"><span style="font-size: 9pt">
        <input name="Name" class="metingirisi" size="30">
      </span></font>
      </td>
    </tr>
    <tr>
      <td align="right" valign="top" class="fonlu" height="21">
        <font face="Century Gothic" style="font-size: 9pt">Telefon</font></td>
      <td valign="top" class="fonlu" height="21">
        <font face="Century Gothic"><span style="font-size: 9pt">
        <input name="Telefon" class="metingirisi" size="30"></span></font></td>
    </tr>
    <tr>
      <td align="right" valign="top" class="fonlu" height="21">
        <font face="Century Gothic" style="font-size: 9pt">Oyun</font></td>
      <td valign="top" class="fonlu" height="21">
        <select size="1" name="Oyun">
        <option>SJSRO </option>
        <option>SUNWORLD</option>
       
        </select></td>
    </tr>
<tr>
<td align="right" valign="top" class="fonlu" height="21">
        <font face="Century Gothic" style="font-size: 9pt">ÖDEME</font></td>
      <td valign="top" class="fonlu" height="21">
        <select size="1" name="banka">
        <option>PTT</option>
        <option>Yap Kredi</option>
       
        </select></td>
</tr>

   <tr>
      <td align="right" valign="top" class="fonlu" height="21">
        <font face="Century Gothic" style="font-size: 9pt">lem Numaranz</font></td>
      <td valign="top" class="fonlu" height="21">
        <font face="Century Gothic"><span style="font-size: 9pt">
        <input name="siparis" class="metingirisi" size="30"></span></font></td>
    </tr>
      <tr>
      <td align="right" valign="top" class="fonlu" height="21">
        <font face="Century Gothic" style="font-size: 9pt">Char ID</font></td>
      <td valign="top" class="fonlu" height="21">
        <font face="Century Gothic"><span style="font-size: 9pt">
        <input name="siparis" class="metingirisi" size="30"></span></font></td>
    </tr>

   <tr>
      <td align="right" valign="top" class="fonlu" height="21">
        <font face="Century Gothic" style="font-size: 9pt">Char Username</font></td>
      <td valign="top" class="fonlu" height="21">
        <font face="Century Gothic"><span style="font-size: 9pt">
        <input name="siparis" class="metingirisi" size="30"></span></font></td>
    </tr>
 
    <tr>
      <td align="right" valign="top" class="fonlu" height="22">
        <font face="Century Gothic" style="font-size: 9pt">E-Mail</font></td>
      <td valign="top" class="fonlu" height="22">
        <font face="Century Gothic"><span style="font-size: 9pt">
        <input name="Email" class="metingirisi" size="30">
      </span></font>
      </td>
    </tr>
    <tr>
      <td align="right" valign="top" class="fonlu" height="100">
        <font face="Century Gothic" style="font-size: 9pt">Notunuz</font></td>
      <td valign="top" class="fonlu" height="100">
        <font face="Century Gothic"><span style="font-size: 9pt">
        <textarea name="Message" cols="30" rows="6" class="metingirisi"></textarea>
          </span></font>
      </td>
    </tr>
    <tr>
      <td colspan="2" align="center" class="fonlu" height="26"><p>
        <input name="submitform" type="submit" class="metingirisi" value="Gönder">
        <input name="reset" type="reset" class="metingirisi" value="Temizle">
      </p>
      </td>
    </tr>
  </table>
</form>';
}
?>
</head>

2010-03-29 18:41:47 Edit:2010-03-29 20:12:24

nssasmazNursin ŞaşmazAvatar

Ben sızılabilinecek bir açık göremedim.. zaten mail atıyor sadece...

Yalnız dikkat etiğim bir şey var benim telefon numarası alanına metin ve boşluk karakterlerin yazılamaması lazım.. bunu JavaScript ile yapabilrsiniz php ile kontrol ettirmekten ise JS ile kontrol ettirip direk girişi yasaklamanız lazım..

Onun dışında ben bişi görmedim ama yinede ustaların cevabına bakmak lazım....

Gitme vakti gelince gitmek mi zordur kalmak mı?
2010-03-30 14:07:39

phpkodlari.com © 2009 Herkes Php öğrenecek
Eglence ve Oyun: Gamikro