By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,408 Members | 1,624 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,408 IT Pros & Developers. It's quick & easy.

Challenging the user with a dynamic GIF to ensure theyre human

P: n/a
On some sites there is an image that is dynamically generated at page load,
which simply has a few random characters like "a5J7" printed on it (which
change with each page refresh), and the user must enter in those characters
they see in a textbox as if it was a password. This allows the website to
confirm that the visitor is a human, and not just an automated script.

Does anyone know how (if?) this can be done with PHP? my Googling wasnt very
fruitful :(
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Dave Turner wrote:

On some sites there is an image that is dynamically generated at page load,
which simply has a few random characters like "a5J7" printed on it (which
change with each page refresh), and the user must enter in those characters
they see in a textbox as if it was a password. This allows the website to
confirm that the visitor is a human, and not just an automated script.

Does anyone know how (if?) this can be done with PHP? my Googling wasnt very
fruitful :(


Sure, that's actually quite easy.

Check the chapter "XLVI. Image Functions" in the PHP manual.

You'll first have to create some random string and then use the image
functions to output that string as a GIF, JPEG or whatever. There are
some simple examples in the manual that will certainly help you with
that. Check the example given for the imagestring() function.

Bye!
Jul 17 '05 #2

P: n/a
Try http://psbweb.mirrors.phpclasses.org...kage/1163.html

Norm
--
FREE Avatar hosting at www.easyavatar.com
"Dave Turner" <no****@nowhere.nohow> wrote in message
news:42********@quokka.wn.com.au...
On some sites there is an image that is dynamically generated at page load, which simply has a few random characters like "a5J7" printed on it (which
change with each page refresh), and the user must enter in those characters they see in a textbox as if it was a password. This allows the website to
confirm that the visitor is a human, and not just an automated script.

Does anyone know how (if?) this can be done with PHP? my Googling wasnt very fruitful :(

Jul 17 '05 #3

P: n/a
Dave Turner wrote:
On some sites there is an image that is dynamically generated at page load, which simply has a few random characters like "a5J7" printed on it (which change with each page refresh), and the user must enter in those characters they see in a textbox as if it was a password. This allows the website to confirm that the visitor is a human, and not just an automated script.
Does anyone know how (if?) this can be done with PHP? my Googling wasnt very fruitful :(


Keyword: Captcha

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.