Animated GIF CAPTCHA

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
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Animated GIF CAPTCHA

Post by Vegan »

I am contemplating the use of an animated GIF based CAPTCHA to beat up on spam, by befuddling the pixels all I can say is good luck to OCR. :banghead:

Anyone got some code to speed the development up? :D
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
ldougherty
Forum Contributor
Posts: 103
Joined: Sun May 03, 2009 11:39 am

Re: Animated GIF CAPTCHA

Post by ldougherty »

Do you plan on using the same static animated gif each time or are you planning on using a library to dynamically create the image on the fly?

If you are using a single static image or even several static images in an array but something you've already generated you can simply store a text matching value of the image text in a database along with the URL of the image to display. Then on your form have it validate against the image text while displaying the image URL.

Does that make sense?
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: Animated GIF CAPTCHA

Post by jaoudestudios »

I created a class, way back in the day. Which created the captcha spam code image on the fly using SVG to gif. It is quite customable if I remember correctly. You are welcome to use it, use part of it etc...

Captcha spam code using SVG -> Gif
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: Animated GIF CAPTCHA

Post by Vegan »

Thanks, I snipped out the code into a PHP file for review.

Seems a bit mangled from the forum but I can tidy it up easy enough. One feature I like about phpBB3 is that code can be posted and its selectable without messing it up when pasted into your favorite web editor.

The problems with spammers are nasty indeed. Seems anything is fair game for spammers.
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
Post Reply