Main Content
Check your user is human. Have him retype a word in a graphic Archive - Originally posted on "The Horse's Mouth" - 2006-07-17 09:28:12 - Graham Ellis
Do you have trouble with automated programs completing forms on your websites and making cart loads of submissions? Or even just a few spammers submitting their betting ads, performance enhancing pill sites, and share purchase suggestions? And yet you don't want to have to have anyone who wants to use your site register.
Using what has become known as captcha technology , you can display a graphic with some text on what's basically a login page, then have your human user type that text back in. It's very difficult indeed for automata to recognise the text, and can be doubly so if you vary the background, change fonts between characters and change text colour, scale, rotation. Mind you, you can make it pretty tough for the human too.
You'll find captcha in use already on many big sites, and there are other sites that will host the service for you. Actually, if you've got PHP available and the GD module it's very easy to code it up from first principles and that gives you the ultimate of flexibility.
* Try my demo here
* Show source code of main demo
* Show source code of graphic generator
Some other articles
H999 - Additional PHP Material Image indexer / thumbnail display scripts in PHP Catchable fatal error in PHP ... How to catch, and alternative solutions such as JSON Arrays of arrays - or 2D arrays. How to program tables. Exception handling in PHP If nothing, make it nothing. Extra PHP Examples PHP Techniques - a workshop Flipping images on your web page Script to present commonly used images - PHP Copyright and theft of images, bandwidth and members. More PHP sample and demonstration programs Ordnance Survey Grid Reference to Latitude / Longitude Converting from postal address to latitude / longitude Controlling and labelling Google maps via PHP PHP Standalone - keyboard to screen Drawing hands on a clock face - PHP Drawing dynamic graphs in PHP Sorting people by name in PHP Parallel processing in PHP Dates, times, clickable diarys in PHP Display an image from a MySQL database in a web page via PHP Syntax checking in PHP Reporting on the 10 largest files or 10 top scores PHP - a team member leaves This article Hot answers in PHP Presentation, Business and Persistence layers in Perl and PHP PHP Image viewing application PHP - setting sort order with an associative array Merging pictures using PHP and GD Running a Perl script within a PHP page Double Dollars in PHP Stand alone PHP programs Time calculation in PHP the array returned by preg_match_all More maps Ordnance Survey - using a 'Get a map' What and why for the epoch PHP and natural sorting H304 - DDA, Style and image handling An easy way to comply with the new cookie law if your site is well designed Upload Image, Store in database, redisplay in browser. PHP and MySQL Uploading an image, document or pdf via a browser (php) Changing Images World Flags in your PHP pages Choosing from an image with an image map Ongoing Image Copyright Issues, PHP and MySQL solutions This article G903 - Running and moderating forums and social media sites Almost so wrong, but perhaps it's right for some? The unbalanced relationship between customer and provider Welcoming genuine forum posters quickly - but turning away off topic advertisers Identifying and clearing denial of service attacks on your Apache server Can a legitimate forum post become illegal a year later? Facebook marketing - early experiences Change to Libel and Defamation laws from 1st January 2014 Handling requests to a forum - the background process Backups, Codebase, Strategy and more - dealing with forum incidents Acceptable User Policy / vexatious interacter Identifying your real customers and keeping them well informed fast Practical Extraction and Reporting - using Python and Extreme Programming Netiquette for forum newcomers The 500 pound question to get you started How to run a successful online poll / petition / survey / consultation Flying tonight A reluctance to move from old shoes to new Computing under the influence of alcohol Forum membership - a privilege not a right Preventing forum spam - checks at sign up Admins thoughts on banning a member from a forum Stopping forum spam - control of the signup process Why do we delay new forum members through authorisation? Ask the Tutor - Open Source forum Pettifog and forum boards away from public view Making it all worthwhile While the world sleeps ... Software - changes and delays. But courses must run on time! First Great Western Weekend Please don't shout at me! I dont care - goodbye Guidlines for posting on a forum A forum is not always the best vehicle Comment spam blocked. Please comment via Forums Ive just received an email from myself. Should I be worried? Copyright and theft of images, bandwidth and members. The Horse goes on and on No Thank You Save the Forum - A regular clean sweep Why use BBC code not HTML? Running an on line campaign Why shouldn't I spam? Freedom for X is denial of privacy for Y Forum help - a push in the right direction Freedom of speech and freedom to post This article Please Register with Opentalk - but just once! Open source questions? Anyone can ask. How not to run a forum Use me, but use me effectively Feedback as lifeblood The confidence to allow public comments Spelling and grammar Expiration dates or times on web pages Silence is Golden Falling out over the silliest things A192 - Firewalls How can I run multiple web servers behind a single IP address? Setting up your Linux system as a firewall using iptables This article Splash!