English 中文(简体)
Custom captcha design
原标题:

I currently ran into the issue that I 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 ;)

最佳回答

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.

问题回答

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

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.





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签