token.php
<?php $img["width"] = 240; $img["height"] = 86; $img["text"] = $_GET['t']; $img["file"] = @imagecreatefromjpeg ("token_background.jpg"); $font["file"] = $font["files"][$font["rand"]]; $token = imagecreatetruecolor ( $img["width"], $img["height"] ); $color["white"] = imagecolorallocate ( $token, 0,0,0 ); imagecopy ( $token, $img["file"], 0, 0, 0, 0, $img["width"], $img["height"] ); $box = imagettfbbox ( 24, $font["angle"], $font["file"], $img["text"] ); imagecolorallocate ( $token, 0, 0, 0 ); imagettftext ( $token, 24, $font["angle"], $x, $y, $color["white"], $font["file"], $img["text"] ); imagegif ( $token ); imagedestroy( $token ); ?>
Teraz w pliku z formem mam
register.php
<?php $tekst = preg_replace( $banned, "X", strtoupper ( substr ( md5 ( uniqid ( rand(), true ) ), 0, 8 ) ) ); ?>
Ale takie rozwiazanie latwo ominac bo kod tokena bedzie w kodzie a to roboty moga wychwycic. A Z kolei w pliku token.php nie moge generowac kodu bo bedzie mi on potrzebny w pliku form.php wiec jak mam to rozwiazac
