freelance84 Posted July 15, 2010 Share Posted July 15, 2010 I have no idea what these things are called but... To prevent "robots" from filling out forms on your website successfully there is usually a graphical image of some letters and numbers. Would i be right in guessing they work like this... 1. I create a series of these images 2. give each image a reference number (not the numbers/letters in the image) 3. create a mysql table with two fields, image reference & image contents 4. when a user comes to the form on my website an image is selected at random from all the possibles. 5. the user enters the letter/number combination and hits send. Php then simply checks the entered combination against the combination stored in the mysql table As PHP can create images and letters, is there a script that can automatically generate any number of random combinations which eliminate the need for a special table in mysql? Quote Link to comment https://forums.phpfreaks.com/topic/207819-to-prevent-robots/ Share on other sites More sharing options...
Adam Posted July 15, 2010 Share Posted July 15, 2010 They're known as "CAPTCHA" (Completely Automated Public Turing test to tell Computers and Humans Apart) images, and no that's not how they're done. The basic approach is to generate a sequence of numbers and/or letters, present them in a way that isn't easily readable by a computer (i.e. an image - which you can use the GD library to generate), and store the sequence within a session variable. Once the user enters the CAPTCHA sequence their entry is validated against the value in the session variable. If it's correct the form is processed, but if it's false a new CAPTCHA sequence is generated and they have to try again. Quote Link to comment https://forums.phpfreaks.com/topic/207819-to-prevent-robots/#findComment-1086362 Share on other sites More sharing options...
facarroll Posted July 15, 2010 Share Posted July 15, 2010 http://www.phpcaptcha.org/ Quote Link to comment https://forums.phpfreaks.com/topic/207819-to-prevent-robots/#findComment-1086364 Share on other sites More sharing options...
freelance84 Posted July 15, 2010 Author Share Posted July 15, 2010 thanks, I thought there'd be a proper way just didn't know where to start looking Quote Link to comment https://forums.phpfreaks.com/topic/207819-to-prevent-robots/#findComment-1086383 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.