Kendi Yaptım Basit bir güvenlik kodu uygulaması
küçük projelerinizde kullana bilirsiniz
kodları
index.php
<form action="gel.php" method="post"post">
<input type="text" name="g" />
<img src="kod.php" />
<input type="submit" value="gönder" />
</form>
kod.php
<?php
session_start();
$rand = rand();
header("Content-type:image/png");
$_SESSION['guv'] = $rand;
$resim = imagecreate(95,30);
$siyah = imagecolorallocate($resim,0,0,0);
imagefill($resim,0,0,$siyah);
$beyaz = imagecolorallocate($resim,rand(0,255),rand(0,255),rand(0,255));
imagestring($resim,4,10,10,"$rand",$beyaz);
imagepng($resim);
imagedestroy($resim);
//Nuh Çolakkadıoglu
?>
gel.php
<?php 
session_start();
if($_POST['g'] != $_SESSION['guv']){
echo "Kod Yanlış";
}else{
echo "Dogru";
}
//nuh Çolakkadıoğlu the_of_maho@hotmail.com
?>