Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Can someone point me to some existing code that has the user click on a
link in an email that brings him to a page that presents some
letters/numbers for him to type in in order to validate an account?

BTW, what purpose do those letters serve?


Re: Confirmation

Answer to what the letters do: It is to stop bots, spam bots, macros,
anything automated really from making account to spam or whatever.

I doubt there is an existing script as it is only useful if you are
validating something and most code uses a different sytle of system for
certain things. But use php GD and i would probably md5 the value and
put it in a $_GET value.

Re: Confirmation

Good thought about the bots.  Thanks.

As for the rest, what do you mean by GD?

I suppose it would go something like this:

Send an email to them bringing them to the validation page.

Put in a random sequence of letters and numbers.

When they type it, compare the two.

Why do I need to md5 it and where would it go?


Re: Confirmation

Hash: SHA1

Shelly wrote:

Quoted text here. Click to load it

Have a look at , they got a lot of resources about
CAPTCHAs, how's ans why's.

Quoted text here. Click to load it

GD stands for the Boutelle's Graphical Library. The library used by PHP in
its image manipulation functions.

- --  
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

El hombre nunca es demasiado viejo para aprender.

Version: GnuPG v1.4.2 (GNU/Linux)


Re: Confirmation

The reason for using those letters for confirmation is so that only a
human can submit the form.  If you use plain text, an automated program
could read the string and input it on its own.  So, to avoid this, you
turn the randomized string of letters/numbers into an image using GD
(with GD, you can overlay text into an image.  You create an image on
the fly to your desired dimensions and load that image on the screen.
You need to keep a copy of the string you used to create the image for
comparison.  You can either keep it in a database, or in a $_GET value,
which is where the MD5 comes in - to help encrypt it.  I'd suggest the
database route, personally, but that involves a more in-depth program,
so be up for it if you do that (tie it together with the session id for
example).  When the user types in the random string form the image,
then compare it to the stored value (from database or your $_GET value).

Re: Confirmation

You would use the function


to get your text onto the image, as an example.  You can find the
details on how to use it (syntax, examples) by going to the PHP manual:

Re: Confirmation

Quoted text here. Click to load it

Do a google search on "php captcha".  There are lots of hits on this.  
This one explains it:

The graphic letters and numbers you see in these pages are to defeat  
'bots.  They are an acroymn for "Completely Automated Public Turing-test  
to tell Computers and Humans Apart" which I didn't know until just now.  
You can certainly do a validation page without them.

DeeDee, don't press that button!  DeeDee!  NO!  Dee...

Re: Confirmation

Ah, I always wondered what "captcha" was - now I know, even though I
always did - I just never knew what it was called.

Site Timeline