473,382 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Challenging the user with a dynamic GIF to ensure theyre human

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
3 1661
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: zlst | last post by:
Many technological innovations rely upon User Interface Design to elevate their technical complexity to a usable product. Technology alone may not win user acceptance and subsequent marketability....
3
by: Eric | last post by:
I have built a composite user web control that I want to create dynamically. The form will contain a variable number of these controls and as well some of the contents of the user web control...
10
by: musosdev | last post by:
Hi guys I'm trying to migrate to VS2005... I've managed to do that, but realised I'd opened my web projects as file projects, and I'm getting the error about network BIOS command limit. ...
3
by: Dotnet Gruven | last post by:
I've built a WebForm with a Table added dynamically in Page_Load when IsPostBack is false. The table includes a couple of TextBoxes, RadioButtonLists and CheckboxLists. On postback, those...
5
by: alainpoint | last post by:
Hi, I have what in my eyes seems a challenging problem. Thanks to Peter Otten, i got the following code to work. It is a sort of named tuple. from operator import itemgetter def...
8
by: Jackson | last post by:
I want a class that will determine its base class by the argument passed in. What I am about to write _does_not_work_, but it shows what I am trying to do. class ABC(some_super): def...
95
by: hstagni | last post by:
Where can I find a library to created text-based windows applications? Im looking for a library that can make windows and buttons inside console.. Many old apps were make like this, i guess ...
8
by: Grizlyk | last post by:
To continue some ideas of "C++ Archeology: Limits of OO paradigm", i want to ask about C++ development. There are C++ compilers, that has been written in old good C. Are C or pascal perfect...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.