comparing Text from Image

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dumlee
Forum Commoner
Posts: 33
Joined: Mon Jun 30, 2008 12:06 am

comparing Text from Image

Post by dumlee »

How to insert Image containing text in Registration Page and compare the text entered by user with that present in Image.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: comparing Text from Image

Post by Benjamin »

User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: comparing Text from Image

Post by Apollo »

You mean a CAPTCHA, there are plenty of ready-to-use implementations available. See also this topic.
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Re: comparing Text from Image

Post by Rovas »

Another method for Turing test of distinguishing humas and computer is to put a image containing an object so that the user can put his name. The implementations is a MySQL table that contains the image and correct answer. You make a script that randomly picks one of the images and verify the answer. Another method is to mathematical equations or simple calculus which are also simple to implement.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: comparing Text from Image

Post by onion2k »

Rovas wrote:Another method for Turing test of distinguishing humas and computer is to put a image containing an object so that the user can put his name. The implementations is a MySQL table that contains the image and correct answer. You make a script that randomly picks one of the images and verify the answer.
Interesting idea, but if you displayed an image of, for example, a car how would validate people who enter "automobile" or "red car" or "Ferrari F430"? They'd all be correct but they wouldn't match what's in the database.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: comparing Text from Image

Post by jayshields »

Maybe he means something more simple like "Identify which shape is shown" and then you can show a square, triangle, circle, etc.
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Re: comparing Text from Image

Post by Rovas »

onion2k wrote: Interesting idea, but if you displayed an image of, for example, a car how would validate people who enter "automobile" or "red car" or "Ferrari F430"? They'd all be correct but they wouldn't match what's in the database.
If you put a picture of a cat do you think that a majority of people will say: "That' s a male Chartreux!" and input male Chartreux no they put cat, the same goes for the Ferrari F430. Also like Jay said you could put geometric shapes or everyday objects: chair, table, a bottle, etc.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: comparing Text from Image

Post by jayshields »

Speaking from zero experience, I think that with CAPTCHA's, aslong as you write your own it doesn't matter how simple it is, it's going to be fine. No ones going to write a bot to spam one website (with some exceptions).

I say this because my example of geometric shapes would be much easier to crack than some of the mega obscure text CAPTCHA's out there now - which leads me onto another topic - how annoying it is when you have to guess a CAPTCHA more than once.
Post Reply