NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page PHP - Animated Captcha

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 02-18-2008, 11:55 PM THREAD STARTER               #1 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 




PHP - Animated Captcha


Hi, i want to share my animated captcha script.
Maybe you want to use it in your website or such

Image demo :
http://upload.kapanlagi.com/images/t...e8671176-t.gif
http://upload.kapanlagi.com/images/t...e867d7c5-t.gif
????: NamePros.com http://www.namepros.com/code/434273-php-animated-captcha.html
http://upload.kapanlagi.com/images/t...e86822bb-t.gif


Download link :
http://dy.xrvel.googlepages.com/animatedcaptcha.zip

Last modified : November, 18th, 2008.


Improve your captcha !
Code:
  • Create more background images with image editor to improve your background combination.
  • Use more TTF fonts to improve your font combination.
  • Use various text color.
History :
Code:
Version 1,4,1
  • new property "regenerate_session_id" (boolean) (PHP 4 >= 4.3.2, PHP 5). if true, session id is regenerated when a user enters invalid guess. I believe this slightly improves the captcha defense against automation / bot. Please check "animatedcaptcha_example.php" for detail. But warning, all related data in $_SESSION are destroyed too.
  • More fonts are included.
  • More and larger background images.
  • Random alphabets are used as character set (a-z). The previous one used (a-f and 0-9)
  • Random string length on captcha generator file.
  • Some code change.
Version 1,3,2
  • More distortion option.
  • Only the letters and grids are distorted. The background is not distorted.
  • More fix.
Version 1,3,1
  • Add background from GIF file to the captcha. (the old one used plain background).
  • Add some distortion in the letters.
  • Grid numbers are reduced.
  • Please check your old captcha file ("animatedcaptcha_generate.php" in the example), and replace it with the new one.
  • Recommended frame number is 2 now. (size +- 7-8 kb)
__________________
Last edited by xrvel; 11-18-2008 at 06:18 PM. Reason: Update
xrvel is offline  
Old 02-19-2008, 10:30 PM   #2 (permalink)
 
kleszcz's Avatar
Join Date: Jul 2006
Posts: 4,607
kleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatness
 



Marrow Donor Program Multiple Sclerosis
Interesting captcha. Thanks xrvel. Rep added.
kleszcz is offline  
Old 02-19-2008, 10:40 PM THREAD STARTER               #3 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 





Hi, Hiroki.

Thank you. I hope this script is useful

Kurniawan.
__________________
xrvel is offline  
Old 03-27-2008, 06:40 PM   #4 (permalink)
Senior Member
 
RickM's Avatar
Join Date: Sep 2005
Location: Herts, UK
Posts: 3,796
RickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant future
 


Cancer Survivorship Save The Children Save The Children Cancer Animal Cruelty Child Abuse Cancer Survivorship 9/11/01 :: Never Forget Animal Cruelty Child Abuse Animal Rescue Animal Cruelty Protect Our Planet Protect Our Planet Protect Our Planet Animal Cruelty Save a Life
Nice one! This should help stop the spambots!

What license is it released under (if any)?

Rick
__________________
RickM

Web Design Forums - Over 22,000 Web Designers & Programmers just like you!
WSDReg - Affordable Domain Registration. Serving NP members since 2006!
RickM is offline  
Old 03-27-2008, 08:00 PM THREAD STARTER               #5 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 





Originally Posted by RickM
Nice one! This should help stop the spambots!
????: NamePros.com http://www.namepros.com/showthread.php?t=434273

What license is it released under (if any)?

Rick
Thank you Rick
You can use it freely

- Kurniawan
__________________
xrvel is offline  
Old 03-28-2008, 12:53 AM   #6 (permalink)
Account Closed
 
DeViAnThans3's Avatar
Join Date: Apr 2006
Location: Belgium
Posts: 442
DeViAnThans3 is a name known to allDeViAnThans3 is a name known to allDeViAnThans3 is a name known to allDeViAnThans3 is a name known to allDeViAnThans3 is a name known to allDeViAnThans3 is a name known to all
 



Oh my, this is a very nice script!
Well done! (rep added)
DeViAnThans3 is offline  
Old 03-28-2008, 12:58 AM   #7 (permalink)
NamePros Legend
 
weblord's Avatar
Join Date: Dec 2005
Location: Philippines - www.Nabaza.com
Posts: 19,785
weblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatness
 


Autism Protect Our Planet
this one's easier to read compared to e-gold.com's scrolling captcha
__________________
Nabaza.com - Amaia
weblord is offline  
Old 03-28-2008, 01:10 AM THREAD STARTER               #8 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 




Thank you for using my script
I hope this script helps to stop the bot

- Kurniawan.
__________________
xrvel is offline  
Old 05-01-2008, 04:04 AM   #9 (permalink)
The original NP Emo Kid
 
liam_d's Avatar
Join Date: Jan 2005
Location: Plymouth, UK
Posts: 1,693
liam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to all
 




Just checked it out and that is very cool, thanks pal
liam_d is offline  
Old 05-01-2008, 04:46 AM THREAD STARTER               #10 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 




Thanks, i'm glad it's useful

- Kurniawan
__________________
xrvel is offline  
Old 05-01-2008, 06:07 AM   #11 (permalink)
I'll do it
 
-Nick-'s Avatar
Join Date: Dec 2005
Location: India
Posts: 6,927
-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness
 


Member of the Month
September 2007
Adoption
That is awesome script. Great one.

Thanks a lot for sharing it with all of us
-Nick- is offline  
Old 07-11-2008, 02:15 PM   #12 (permalink)
New Member
Join Date: Jun 2008
Posts: 18
humair4 is an unknown quantity at this point
 



thanks it's great
humair4 is offline  
Old 07-11-2008, 03:41 PM   #13 (permalink)
NamePros Member
Join Date: Jul 2008
Posts: 43
netguy33 is an unknown quantity at this point
 



Deleted
Last edited by netguy33; 05-10-2009 at 06:19 AM.
netguy33 is offline  
Old 07-11-2008, 06:10 PM   #14 (permalink)
Account Closed
Join Date: Jun 2008
Posts: 156
itnashvillecom has a spectacular aura aboutitnashvillecom has a spectacular aura about
 



Very nice, just a bit nauseating. lol
itnashvillecom is offline  
Old 07-12-2008, 09:25 PM THREAD STARTER               #15 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 




Thank you Last update is July 11th 2008
__________________
xrvel is offline  
Old 07-16-2008, 11:20 AM   #16 (permalink)
 
kleszcz's Avatar
Join Date: Jul 2006
Posts: 4,607
kleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatness
 



Marrow Donor Program Multiple Sclerosis
Thanks xrvel. What's new on this new update?
kleszcz is offline  
Old 07-19-2008, 02:41 AM THREAD STARTER               #17 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 





Last modification was a little fix on "validate" function
__________________
xrvel is offline  
Old 07-20-2008, 08:29 PM THREAD STARTER               #18 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 




Modification added. Still need some distortion function
__________________
xrvel is offline  
Old 08-04-2008, 12:53 PM   #19 (permalink)
Senior Member
 
wicked_gal00's Avatar
Join Date: Jun 2003
Location: Toronto
Posts: 2,383
wicked_gal00 is a splendid one to beholdwicked_gal00 is a splendid one to beholdwicked_gal00 is a splendid one to beholdwicked_gal00 is a splendid one to beholdwicked_gal00 is a splendid one to beholdwicked_gal00 is a splendid one to beholdwicked_gal00 is a splendid one to beholdwicked_gal00 is a splendid one to behold
 



Nice job. I think the trick with captchas is that now that they need to get so complicated you still need to make it less annoying for the user to deal with it. I've even read about a captcha scheme that makes a 3D scene with a few objects and asks you where some objects are in relation to others.
wicked_gal00 is offline  
Old 08-18-2008, 03:37 AM THREAD STARTER               #20 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 





Originally Posted by wicked_gal00
Nice job. I think the trick with captchas is that now that they need to get so complicated you still need to make it less annoying for the user to deal with it. I've even read about a captcha scheme that makes a 3D scene with a few objects and asks you where some objects are in relation to others.
I found some 3D example on http://spamfizzle.com/CAPTCHA.aspx. Interesting. Thank you for the information. I think this is the limit of 2D captcha
__________________
xrvel is offline  
Old 08-18-2008, 04:46 AM   #21 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




Nice script, if I create something that requires a CAPTCHA, I'll be sure to use it
Barrucadu is offline  
Old 09-20-2008, 10:51 AM   #22 (permalink)
Senior Member
 
nasaboy007's Avatar
Join Date: Jul 2005
Location: NJ
Posts: 1,219
nasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud of
 



Perfect. I've been meaning to put a captcha onto my contact form, but i just got around to it. all the captchas i found were too much of a pain to install, this was perfect.

Rep'd!
nasaboy007 is offline  
Old 09-23-2008, 05:07 AM THREAD STARTER               #23 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 




Nice. Thank you for using this
__________________
xrvel is offline  
Old 11-18-2008, 06:21 PM THREAD STARTER               #24 (permalink)
i love automation
 
xrvel's Avatar
Join Date: Nov 2007
Location: xrvel.com
Posts: 1,620
xrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant futurexrvel has a brilliant future
 




Yummy Update


I have updated the script with these changes :
  • new property "regenerate_session_id" (boolean) (PHP 4 >= 4.3.2, PHP 5).
    ????: NamePros.com http://www.namepros.com/showthread.php?t=434273
    if true, session id is regenerated when a user enters invalid guess.
    I believe this slightly improves the captcha defense against automation / bot.
    Please check "animatedcaptcha_example.php" for detail.
    But warning, all related data in $_SESSION are destroyed too.
  • More fonts are included.
  • More and larger background images.
  • Random alphabets are used as character set (a-z). The previous one used (a-f and 0-9)
  • Random string length on captcha generator file.
  • Some code change.
__________________
xrvel is offline  
Old 11-18-2008, 11:58 PM   #25 (permalink)
Senior Member
 
ezimedia's Avatar
Join Date: Dec 2003
Location: IllawarraClassifieds.com.au
Posts: 2,361
ezimedia has a brilliant futureezimedia has a brilliant futureezimedia has a brilliant futureezimedia has a brilliant futureezimedia has a brilliant futureezimedia has a brilliant futureezimedia has a brilliant futureezimedia has a brilliant futureezimedia has a brilliant futureezimedia has a brilliant futureezimedia has a brilliant future
 




HI

How does one add this to a script to protect it from spam...

Do you have instructions..

Tom
ezimedia is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 03:13 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger