PHP Captcha Scripts and Tutorials
- PHP Captcha Scripts and Tutorials
- PHP Captcha Scripts and Tutorial with Arithmetic Question
- PHP Captcha Scripts and Tutorial with Text Copying
- PHP Captcha Scripts and Tutorial with Simple Question Answering
- PHP Captcha Scripts and Tutorial with reCAPTCHA
- PHP Captcha Scripts and Tutorial with Google reCAPTCHA
PHP Captcha Scripts and Tutorial with Arithmetic Question
PHP Captcha Scripts and Tutorial with Text Copying
PHP Captcha Scripts and Tutorial with Simple Question Answering
PHP Captcha Scripts and Tutorial with reCAPTCHA
PHP Captcha Scripts and Tutorial with Google reCAPTCHA
This page is a tutorial on "PHP Captcha Scripts and Tutorials". Our overall method is to use the PHP GD Library and a TrueType font and PHP to make captchas.
To be clear, you do NOT need write permissions to create captcha pictures with GD and display them and you do not need write permissions to store captcha pictures in MySQL and use our scripts to display them. (Happily, none of our captcha scripts require MySQL or any other database. However, even though the captcha aspect needs only PHP scripts and no database use, the part where the registrations store user data surely does need MySQL.) Using Google reCAPTCHA is the safest free way to do captchas, and it's popular as well as effective. But it's more fun to make your own captcha system, like the ones we supply.
The rest of this page assumes you wish to use our captcha scripts, and that you are willing to use a TrueType font in the process. We dug up a TrueType font the same way you can: go to your WINDOWS folder and search. We found 389 files to choose from, such as times.ttf, comic.ttf, arial.ttf, etc. Put this and a few others in the folder your script is in so you can experiment. The hans.ttf file we found that is the Invite SF True Type Font bundled with Serif PagePlus (get at fonts101.com) was perfect for one of our captcha scripts. The Holisb__.ttf file we found that is the Holiday Springs BTN True Type Font (get at MyFonts.com) was perfect for another one of our captcha scripts.
We all wish to avoid website spam, fake site registrations, dictionary attacks, worms, and online poll results corruption. Even a simple captcha method will avoid most of this time wasting nonsense. (Why can't those guys get a life?!) So use our scripts with our blessings to help avoid this type of stuff. We cannot guarantee you will avoid spam using our scripts, but it will surely slow the spammers down. No site or script or captcha will ever be 100% hacker proof. Even reCAPTCHA captchas are vulnerable to low-paid captcha solvers in foreign countries working for crap wages for the spammers who use these methods to get around the captchas that are bot-proof because of their clever distortedness. It amazes us that the spammers find that spending money for such a thing is worth it. Go figure . . .
Our PHP Captcha Scripts and Tutorial with Text Copying script uses sessions to keep track of what user is doing what. It monitors how many login attempts the user has used, and once there have been over three, it gives the user a message and throws him out of the script. Nothing stops users from closing their browsers and returning to the script, which will start a new session and allow the user three more login attempts. But having to do that will surely slow down spambots—however easy the captchas are for humans to solve. A legitimate user will usually get the logging in process right the first time, of course, but just in case there's a typo, three tries are supported. We use the PHP GD Library and a TrueType font and PHP to create the captcha, which changes each time it is used.
Our PHP Captcha Scripts and Tutorial with Arithmetic Question script uses sessions to keep track of what user is doing what. It does not monitor how many login attempts the user has used. If you want that, use the code from the PHP Captcha Scripts and Tutorial with Text Copying script. We use the PHP GD Library and a TrueType font and PHP to create the captcha, which changes each time it is used. This type of captcha uses a simple arithmetic question in which the user is asked to solve what the result will be of either adding or subtracting a one digit number from a two digit number, like 56+9 or 94-3. There are 1638 possible puzzles, since the one digit numbers are limited to 1 through 9 and the two digit numbers are limited to 10 through 90. We know of no bots that are able to solve these puzzles, but there could be some either today or in a year or two. Or maybe not (?)
Our PHP Captcha Scripts and Tutorial with reCAPTCHA script isn't a script—it's a bunch of them. Five of our 6 Personal Status Boards (PSBs) have register-with-captcha.php scripts included with them that use the reCAPTCHA method. Anywhere you want a reCAPTCHA captcha you may apply this method. It is FREE. register-with-captcha.php outlines how you can apply this method for your own site registration scripts. We use Personal Status Board (PSB) registration as an example.
The PHP Captcha Scripts and Tutorial with Simple Question Answering script isn't a script—it's a bunch of them. Anywhere you want a very simple captcha you may apply this method. Type text puzzles into your favorite graphics program. Our favorite is ImageForge. Save:
or some other question similar to it, as a .png image. Use it in your logins, registation scripts, polls, etc. We use it in register-by-email.html, PHP-guestbook-script.html, message-login.html, forum-login.html, chat-room-login.html, and blog-login.html.