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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.