开发者

Custom captcha design

开发者 https://www.devze.com 2022-12-13 08:34 出处:网络
I currently ran into the issue that I开发者_StackOverflow社区 do not have the money to buy/rent any professional captchaing service.

I currently ran into the issue that I开发者_StackOverflow社区 do not have the money to buy/rent any professional captchaing service. So I tried to look around for OS captcha generators, and captcha designs.

I also had a brief brainstorm about my own and simple captcha design.

Do you have any preferences, or can give me a good advice handling captchas in PHP without having huge perfomance leeks?

(My attempt to design a simple captcha: .pdf)

EDIT: Thanks to all of you, I am sorry for only giving one "right-answer", but +1 for every good answer ;)


I actually would suggest that rather than rolling your own you use reCAPTCHA as it is free and of very good quality (used by this site, Facebook, Craigslist etc).

It also meets your requirements in that it isn't resource intensive, as all the image generation and distortion is done on the reCAPTCHA server.

PHP examples can be found here


If you want to design your own captcha, I highly recommend you take a look at this tutorial. It goes through a basic captcha design, allowing you to alter the design of the captcha as you wish, using various PHP image modification functions.

You could alter the code to use random fonts, make each character a different size, skew the image, etc. The tutorial is to show you how a code is created, how it's used with a session, and how to actually use the image in an input form.


Leaving aside the problem of CAPTCHAs being a horrible barrier for users… ReCaptcha should solve the budgetary issues without making you reinvent the wheel.


First and foremost thing you must consider is that you captcha is not easily breakable. There are some good old captchas already breaked/decoded using javascript. For further info please visit these pages:

http://ejohn.org/blog/ocr-and-neural-nets-in-javascript/
http://blog.makezine.com/archive/2009/01/javascript_captcha_decoder.html


To generate it , like Captcha Creator is a powerful and complete PHP Captcha Script that generates Captcha Images. The classic approach is to generate some random text, apply some random effects to it and convert it into an image.

0

精彩评论

暂无评论...
验证码 换一张
取 消