This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > January 2005 > Using a CAPTCHA image with PHP





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Using a CAPTCHA image with PHP
Pyromancer

2005-01-13, 11:15 pm

I'm using PHP and I would like to implement randomly generated Captcha(
completely automated public Turing test to tell computers and humans apart)
images. For an example, go to Paypal.com registration. They have these
distorted images with letters that they ask you to type in. I''ve searched for
PHP scripts to do this but I could not find anything. How could I implement
this?

Kramerica Industries

2005-01-13, 11:15 pm

Example here:
http://tinyurl.com/3pg6c
See this presentation:
http://nyphp.org/content/presentations/GDintro/
Specifically
http://nyphp.org/content/presentations/GDintro/gd23.php

"Pyromancer" <webforumsuser@macromedia.com> wrote in message
news:cs77qf$4il$1@forums.macromedia.com...
> I'm using PHP and I would like to implement randomly generated Captcha(
> completely automated public Turing test to tell computers and humans
> apart)
> images. For an example, go to Paypal.com registration. They have these
> distorted images with letters that they ask you to type in. I''ve
> searched for
> PHP scripts to do this but I could not find anything. How could I
> implement
> this?
>



Pyromancer

2005-01-14, 4:15 am

The links that you gave me don't seem to relate to Captcha images at al. The
first picture is just plain text and is not distorted in any way. Are there
any other resources that would teach me how to implement this? It needs to be
distorted and impossible for a robot to read. Just go to Paypal registration
and see there!

Kramerica Industries

2005-01-14, 4:15 am

Have you tried http://www.captcha.net/ ?

Not being a robot expert ... Can a robot really read text within an image,
if so how?



"Pyromancer" <webforumsuser@macromedia.com> wrote in message
news:cs7fv3$bk1$1@forums.macromedia.com...
> The links that you gave me don't seem to relate to Captcha images at al.
> The
> first picture is just plain text and is not distorted in any way. Are
> there
> any other resources that would teach me how to implement this? It needs to
> be
> distorted and impossible for a robot to read. Just go to Paypal
> registration
> and see there!
>



Joe Makowiec

2005-01-14, 4:15 am

On 13 Jan 2005 in macromedia.dreamweaver, Kramerica Industries wrote:

> Have you tried http://www.captcha.net/ ?
>
> Not being a robot expert ... Can a robot really read text within an
> image, if so how?


Dan Vendel started a thread a month or so back - he pointed out that if
you googled a certain phrase, you'd come to his website. The phrase
occured only in an image in fairly tiny type, and, as far as I am aware,
nowhere else. I don't remember offhand what it was, but the
demonstration was pretty convincing that GoogleBot was picking up text
from images.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
Alan

2005-01-14, 4:15 am

bot 'sees' an image.

evaluates image for contrast patterns that would be more likely to be text
vs. photo content.

rough fit contrast pattern against series of common font patterns, to
discern if there are letter patterns.

if there are letter patterns, use fuzzy logic to fit series of letters to a
dictionary list of words

the end result, a bot that can "read" bitmap text from an image file.



> Not being a robot expert ... Can a robot really read text within an image,
> if so how?


Pyromancer

2005-01-14, 4:15 am

Yes, I have a tried captcha.net, but there are just announcements and
demonstrations there - nothing i can use. Isn't there any PHP script that can
generate those distorted images? How do the sites that implement Captcha's do
it? Thanks

Alan

2005-01-14, 4:15 am

sorry, i missed the start of the thread.

you are looking to put a confirmation image into your form to cut down on
bot submissions?

some info here maybe:

http://www.junkeater.com/index.php

could probably turn up some tutorials on doing it yourself, using the GD
image library with php.



> Isn't there any PHP script that can
> generate those distorted images?


Alan

2005-01-14, 4:15 am

a tutorial-
http://www.planet-source-code.com/v...CodeId=739&lngW
Id=8

a 15 dollar pay-for script-
http://www.scriptsjoint.com/vvf.php

note- that pay-for-script gives an alternative for doing this if GD isn't
available for creating graphics on the fly on the server. Can be done using
a randomly selected pre-made image, and verifying the return matches the
select image's "text".

>
>
>


Michael Fesser

2005-01-14, 7:14 am

.oO(Joe Makowiec)

>I don't remember offhand what it was, but the
>demonstration was pretty convincing that GoogleBot was picking up text
>from images.


http://catalogs.google.com/

Micha
Michael Fesser

2005-01-14, 7:14 am

.oO(Pyromancer)

>I'm using PHP and I would like to implement randomly generated Captcha


May I ask why you want to do it? It's a fact that visual verification
systems alone cause accessibility problems for people without graphical
browsers.

Inaccessibility of Visually-Oriented Anti-Robot Tests
http://www.w3.org/TR/turingtest/

Additionally CAPTCHAs are insecure. It's proved by concept that they can
be broken by a bot or with other kinds of hacks ("social engineering").

Breaking a Visual CAPTCHA
http://www.cs.berkeley.edu/~mori/gimpy/gimpy.html

Spammers, porn and accessibility
http://www.bestkungfu.com/archive/d...-accessibility/

Micha
Kramerica Industries

2005-01-14, 12:15 pm

>> Dan Vendel started a thread a month or so back

Just Googled that thread. Pretty neat.

What's to say down the road they wont have the tech to parse these CAPTCHA
images?


"Joe Makowiec" <makowiec@invalid.invalid> wrote in message
news:Xns95DDEEED7497makowiecatnycapdotrE@216.104.212.96...
> On 13 Jan 2005 in macromedia.dreamweaver, Kramerica Industries wrote:
>
>
> Dan Vendel started a thread a month or so back - he pointed out that if
> you googled a certain phrase, you'd come to his website. The phrase
> occured only in an image in fairly tiny type, and, as far as I am aware,
> nowhere else. I don't remember offhand what it was, but the
> demonstration was pretty convincing that GoogleBot was picking up text
> from images.
>
> --
> Joe Makowiec
> http://makowiec.net/
> Email: http://makowiec.net/email.php



darrel

2005-01-14, 12:16 pm

> Yes, I have a tried captcha.net, but there are just announcements and
> demonstrations there - nothing i can use. Isn't there any PHP script that

can
> generate those distorted images?


Google seems to find some:

http://www.google.com/search?q=php+captcha


darrel

2005-01-14, 12:16 pm

> What's to say down the road they wont have the tech to parse these CAPTCHA
> images?


See the link in my other reply. We already have this. ;o)

-Darrel


darrel

2005-01-14, 12:16 pm

> Spammers, porn and accessibility

What a great article title. ;o)

-Darrel


darrel

2005-01-14, 12:16 pm

> Not being a robot expert ... Can a robot really read text within an image,
> if so how?


OCR technology has been around for well over a decade.

In fact, it's not impossible for programs to read distorted text either:

http://www.cs.berkeley.edu/%7Emori/gimpy/gimpy.html


Personally, though I haven't seen it used yet, I think it's better to simply
use plain-text logic puzzles:

write the following number in numeral form: one thousand
enter the letter that falls between c and e
enter this word but using all capital letters: cat

etc.

The advantage is that you can leave them plain-text, making them more
accessible to those that don't see images. The disadvantage is that you may
exclude folks that have cognitive disabilities.

-Darrel


Kramerica Industries

2005-01-14, 7:16 pm

>>OCR technology has been around for well over a decade.
I knew that & thanks, but I was looking for the technical answer, which Alan
gave above.



"darrel" <notreal@hotmail.com> wrote in message
news:cs8otp$ph7$1@forums.macromedia.com...
>
> OCR technology has been around for well over a decade.
>
> In fact, it's not impossible for programs to read distorted text either:
>
> http://www.cs.berkeley.edu/%7Emori/gimpy/gimpy.html
>
>
> Personally, though I haven't seen it used yet, I think it's better to
> simply
> use plain-text logic puzzles:
>
> write the following number in numeral form: one thousand
> enter the letter that falls between c and e
> enter this word but using all capital letters: cat
>
> etc.
>
> The advantage is that you can leave them plain-text, making them more
> accessible to those that don't see images. The disadvantage is that you
> may
> exclude folks that have cognitive disabilities.
>
> -Darrel
>
>



Alan

2005-01-19, 4:18 am

bot 'sees' an image.

evaluates image for contrast patterns that would be more likely to be text
vs. photo content.

rough fit contrast pattern against series of common font patterns, to
discern if there are letter patterns.

if there are letter patterns, use fuzzy logic to fit series of letters to a
dictionary list of words

the end result, a bot that can "read" bitmap text from an image file.



> Not being a robot expert ... Can a robot really read text within an image,
> if so how?


Joe Makowiec

2005-01-19, 4:18 am

On 13 Jan 2005 in macromedia.dreamweaver, Kramerica Industries wrote:

> Have you tried http://www.captcha.net/ ?
>
> Not being a robot expert ... Can a robot really read text within an
> image, if so how?


Dan Vendel started a thread a month or so back - he pointed out that if
you googled a certain phrase, you'd come to his website. The phrase
occured only in an image in fairly tiny type, and, as far as I am aware,
nowhere else. I don't remember offhand what it was, but the
demonstration was pretty convincing that GoogleBot was picking up text
from images.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
Pyromancer

2005-01-19, 4:18 am

Yes, I have a tried captcha.net, but there are just announcements and
demonstrations there - nothing i can use. Isn't there any PHP script that can
generate those distorted images? How do the sites that implement Captcha's do
it? Thanks

Alan

2005-01-19, 4:18 am

a tutorial-
http://www.planet-source-code.com/v...CodeId=739&lngW
Id=8

a 15 dollar pay-for script-
http://www.scriptsjoint.com/vvf.php

note- that pay-for-script gives an alternative for doing this if GD isn't
available for creating graphics on the fly on the server. Can be done using
a randomly selected pre-made image, and verifying the return matches the
select image's "text".

>
>
>


darrel

2005-01-19, 4:18 am

> Yes, I have a tried captcha.net, but there are just announcements and
> demonstrations there - nothing i can use. Isn't there any PHP script that

can
> generate those distorted images?


Google seems to find some:

http://www.google.com/search?q=php+captcha


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews