Been playing around with this most of the day
[php]
<?php function randomkeys($length) { $pattern = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789"; for($i=0;$i<$length;$i++) { $key .= $pattern{rand(0,60)}; } return $key; } $code = randomkeys(5); header("Content-type: image/png"); $im = imagecreatetruecolor(50, 20); $black = imagecolorallocate($im, 0, 0, 0); $white = imagecolorallocate($im, 255, 255, 255); imagefilledrectangle($im, 0, 0, 70, 25, $white); $font = imageloadfont("comicbd.ttf"); imagestring($im, $font+5, 4, 4, "$code", $black); imagepng($im); ?>[/php]
I know how to put the file into the page
<img src="whatever.php">
What i dont understand is how to validate it against a text field in another page.