Hi everyone,
I have one of those bot stopper things for user verification on forms which I have customarised, where you have to enter the characters of the image (which are random).
Its working fine, however I can't seem to get the value of the text into a normal variable for use outside of the image, to put into the database to be verified with what the user enters..
Can anyone help me get the $stoppertext variable defined so I can use it on the page that this is included on please? (e.g. <img src="img.html"><br><?=$stoppertext?>)
Thanks for any help!
my code for the image is:
<?
$stoppertext = substr(md5(rand(0,999999)), 32-5) ;
$stoppertext = str_shuffle($stoppertext) ;
$stoppertext = wordwrap($stoppertext, 1, ' ', 1) ;
$x = 78 ;
$y = 35 ;
Header("Content-type: image/Jpeg") ;
$img = @ImageCreate ($x, $y) ;
$white = ImageColorAllocate ($img, 255, 255, 255) ;
$black = ImageColorAllocate ($img, 0, 0, 0) ;
ImageString ($img, 3, 8, 5, $stoppertext, $black) ;
ImageString ($img, 1, 20, 25, "Bot Stopper", $black) ;
ImageRectangle ($img, 2, 2, $x-2, 22, $black) ;
ImageLine ($img, 6, 8, 72, 11, $black) ;
ImageJpeg($img) ;
ImageDestroy ;
?>