sayfanın başına
<?
$kod=rand(1000,9999);
?>
ekledim.
<input name="bolum5" type="hidden" id="bolum5" value="<?=$bolum5?>"></td>
altına da
<input type=hidden name=kod1 value="<?=$kod?>"><img src='guvenlik.php?kod="<?=$kod?>"> <input type=text name=kod2>
ekledim.
şimdi sana bi güvenlik.php yazalım
<?
define('DIZIN',basename(dirname(__FILE__)));
$kod=intval($_GET['kod']);
$image=crypt($kod,"abc");
// burdaki abc yi değiştirebilirsin
$image=substr($image,-5);
// burdaki 5 de kaç karakter göstereceğin
$resim = @imagecreatefrompng("kod_arka.png");
Header ("Content-type: image/png");
$x ="10";
$y ="0";
$metin_rengi = imagecolorallocate($resim, 50, 20, 200);
$font = imageloadfont("security.gdf");
imagestring($resim , $font, $x, $y, $image, $metin_rengi);
imagepng($resim );
imagedestroy($resim );
?>güvenlik sayfasına font ve arka plan da ekledim. eğer fontla uğraşmak istemezsen
imagestring($resim , $font, $x, $y, $image, $metin_rengi);
satırı yerine
imagestring($resim , 5, $x, $y, $image, $metin_rengi);
yaz olsun bitsin, yok fontta kullanayım dersen
http://www.pehaspe.com/dosyalar/wftopf.exe
bu program windows fontlarını linux fontuna çevirecektir.
ekle.php ninde başına aşağıdakileri ekle
<?
$kod1=$_POST['kod1'];
$kod2=$_POST['kod2'];
$kod1=crypt($kod,"abc");
// burdaki abc yi üstteki ile aynı olmalı
$kod1=substr($kod1,-5);
// burdaki 5 de üstteki ile aynı olmalı.
if($kod1!=$kod2)
die("güvenlik kodunu eksik veya yanlış girdiniz, lütfen geri dönerek tekrar deneyin");
?>bunları eklersen tamam olur.
guvenlik.php ana dizinde olmak zorunda değil, onu nereye kaydedersen kod_arka.png ve yazı fontunu da oraya atman gerekir.