473,386 Members | 1,830 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,386 software developers and data experts.

"please enter the code as you see in the image" - how does it work?

On many websites they have a blurred image with a code which you're
supposed to reenter in a text box to validate your form submission.

How do I implement such a thing using php?

Apart from preventing automatic form submission by any malicious robot,
does this serve any other purpose?

Mike

Jul 17 '05 #1
5 119036
On 25 Mar 2005 10:35:44 -0800, "siliconmike" <si*********@yahoo.com> wrote:
On many websites they have a blurred image with a code which you're
supposed to reenter in a text box to validate your form submission.

How do I implement such a thing using php?
Search for the keyword "captcha" - it's an acronym.
Apart from preventing automatic form submission by any malicious robot,
does this serve any other purpose?


That's pretty much all they're for.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2
>On many websites they have a blurred image with a code which you're
supposed to reenter in a text box to validate your form submission.

How do I implement such a thing using php?
Make up a bunch of images with blurry pieces (e.g. a single letter
each). Select a code randomly. Put together the pieces showing
that code into a big one with the complete code (this might be just
HTML putting the images side-by-side). Be careful how you name
your images (e.g. calling them A.jpg, B.jpg, C.jpg, ... might let
a bot figure out the code without actually looking at the image.)
You may want to have several differently-blurry images for each
letter. Compare the code the user input against the correct answer.
Apart from preventing automatic form submission by any malicious robot,
does this serve any other purpose?


It slows down automatic rapid-fire form submission by a
not-necessarily-malicious robot or user (load throttling). Other
than that, this is pretty much the only point of doing it.

Beware that some bots have volunteer humans working for them to
solve these puzzles. The bot will promise (usually in SPAM) the
human something, like free access to a porn site, and then relay
your images to him. When he inputs the code, the bot passes it on
to your site. The bot may or may not deliver on its promises to
the human.

Gordon L. Burditt
Jul 17 '05 #3
siliconmike wrote:
[Turing numbers]

How do I implement such a thing using php?

Apart from preventing automatic form submission by any malicious robot,
does this serve any other purpose?


It stops those pesky blind visitors using up your bandwidth.

(Actually to be fair I've come across one or two sites that provide an audio
alternative, but they seem to be the exception...)

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Jul 17 '05 #4
"Gordon Burditt" <go***********@burditt.org> wrote in message
news:42**********************@news.airnews.net...
On many websites they have a blurred image with a code which you're
supposed to reenter in a text box to validate your form submission.

How do I implement such a thing using php?


Make up a bunch of images with blurry pieces (e.g. a single letter
each). Select a code randomly. Put together the pieces showing
that code into a big one with the complete code (this might be just
HTML putting the images side-by-side). Be careful how you name
your images (e.g. calling them A.jpg, B.jpg, C.jpg, ... might let
a bot figure out the code without actually looking at the image.)
You may want to have several differently-blurry images for each
letter. Compare the code the user input against the correct answer.


That wouldn't work. A cracker would figure out in no time which letter is
contained in which image and program that into the bot. It doesn't help much
even if you stitch the images into one file, as a simple pixel by pixel
comparison would yield the answer.

Most implementations I have seen use a random noise background (a random
spot in a large static image, perhaps), with each letter in a differnet font
and size, usually at a small tilt.
Jul 17 '05 #5
siliconmike wrote:
On many websites they have a blurred image with a code which you're
supposed to reenter in a text box to validate your form submission.

How do I implement such a thing using php?


There is a PEAR module for that:

http://pear.php.net/package/Text_CAPTCHA/

Never used it and it's an alpha version, I have no idea how useful it is.

JP
--
Sorry, <de*****@cauce.org> is a spam trap.
Real e-mail address unavailable. 5000+ spams per month.
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Christopher.Becker | last post by:
When I'm running my app, I occaisonally receive this error message: PostgreSQL Error Code(1) "could not create socket: An address incompatible with the requested protocol was used" It appears...
2
by: John Dalberg | last post by:
I installed the Pet Shop 4.0 app. However everytime I try to create a new user, I get a "Please enter a more secure password" error. I tried all kinds of passwords. I looked at the membership...
12
by: John | last post by:
I can't get my head around this! I have the following code: <% .... Code for connection to the database ... .... Code for retrieving recordset ... If Not rs.EOF Then ... Do something...
1
by: perspolis | last post by:
Hi all I have an application that runs well in Debug mode..but when I change to Release mode I get this error Error 48 "sgen.exe" exited with code 1." I don't know why?? thanks in advance
0
by: 2Barter.net | last post by:
" Given BACK what was freely GIVEN " More options 2 messages - Expand all 2Barter.net View profile More options Dec 12, 9:48 pm Blessing Are Country
2
by: brianflannery | last post by:
Greetings! My situation is this. I currently have a database of which in a form displays jpeg pictures (one at a time) which are linked to the db and stored in a separate folder. I have set up a...
5
by: CoderMarc | last post by:
Hi, I can not get the system pause to work in a simple program. Here is my program below: // i/o example #include <iostream> using namespace std; int main ()
5
by: Madmartigan | last post by:
Gidday Question : Write a program that will report the longest and shortest string in its input. I am attempting EX 3.4(page 49) from Accelerated C++ by Koenig and Moo. I keep getting the...
1
by: perhapscwk | last post by:
Hi, I use below in IE, it works but it not work in firefox, please help. <meta http-equiv="Site-Enter" content="revealTrans(Duration=2,Transition=23)"/> <meta http-equiv="Page-Enter"...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.