Jump to content

[SOLVED] Image verification


rofl90

Recommended Posts

Basicly if you want to start from scratch you would need to generate a random string of letters/numbers, any length and case. Then, you would need to have a php-generated image display the random string (preferrably png). Then add the string to the session, maybe md5 it first. All that in one file (randimage.php).

 

Then in your form, include 'randimage.php'; and a textbox next to it. When the form is submitted, you can validate it by:

$sessval = $_SESSION['validate'];
$validate = $_POST['validate'];
$validate = md5($validate);
if ($validate == $sessval) {
echo "Validation successful!"
}else{
echo "Validation failed.";
}

 

That's just basicly a rough sketch of how I would do it. Google some of the terms and it may get you somewhere. Otherwise you can use Captcha.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.