qbox Posted October 16, 2008 Share Posted October 16, 2008 Hi I need to make anti bot script for my login form. I generate the picture with random code. Can you give me any idea how to check the code on the picture with the code which is inserted in the given field? Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/128772-solved-anti-bot-script/ Share on other sites More sharing options...
CroNiX Posted October 16, 2008 Share Posted October 16, 2008 google for 'captcha'. You will find a lot. Quote Link to comment https://forums.phpfreaks.com/topic/128772-solved-anti-bot-script/#findComment-667517 Share on other sites More sharing options...
qbox Posted October 16, 2008 Author Share Posted October 16, 2008 Everyone sell me something..... Can someone give me idea how this can work? Quote Link to comment https://forums.phpfreaks.com/topic/128772-solved-anti-bot-script/#findComment-667522 Share on other sites More sharing options...
GingerRobot Posted October 16, 2008 Share Posted October 16, 2008 Sorry? There are plenty of free examples of captchas out there. Quote Link to comment https://forums.phpfreaks.com/topic/128772-solved-anti-bot-script/#findComment-667526 Share on other sites More sharing options...
CroNiX Posted October 16, 2008 Share Posted October 16, 2008 Basically it generates a random series of numbers/letters using either premade images or created on the fly using the gd library or imagemagick. It asks you to input the letters/numbers that you see into a textbox and submit. If you type in what it has stored, it lets you in. Theres millions of them out there that are free, just be creative with your search terms. 'php create captcha'. http://www.google.com/search?q=php+create+captcha Quote Link to comment https://forums.phpfreaks.com/topic/128772-solved-anti-bot-script/#findComment-667528 Share on other sites More sharing options...
Guest Posted October 16, 2008 Share Posted October 16, 2008 CAPTCHA in PHP is fairly simple; you can use PHP's gd library (image functions) to make them. It would follow this process: 1) Make a random string of letters 2) Store the string in session (not in a hidden field or cookie) 3) Use PHP's gd library (image functions) to: * to create an image * populate the image with letters that match the random strings from #1 * maybe add lines or "noise" so more sophisticated screen-reading bots can't read it... be creative with this, you can even make the letters different sizes and fonts, etc. 4) compare the string in session and what they entered into the textbox! done! Quote Link to comment https://forums.phpfreaks.com/topic/128772-solved-anti-bot-script/#findComment-667537 Share on other sites More sharing options...
qbox Posted October 17, 2008 Author Share Posted October 17, 2008 CAPTCHA in PHP is fairly simple; you can use PHP's gd library (image functions) to make them. It would follow this process: 1) Make a random string of letters 2) Store the string in session (not in a hidden field or cookie) 3) Use PHP's gd library (image functions) to: * to create an image * populate the image with letters that match the random strings from #1 * maybe add lines or "noise" so more sophisticated screen-reading bots can't read it... be creative with this, you can even make the letters different sizes and fonts, etc. 4) compare the string in session and what they entered into the textbox! done! So I can put the letters in the $_SESSION and bots will not be able to read the code from session? Quote Link to comment https://forums.phpfreaks.com/topic/128772-solved-anti-bot-script/#findComment-668347 Share on other sites More sharing options...
Guest Posted October 18, 2008 Share Posted October 18, 2008 Typically yes, because sessions are stored on the server. However, sessions can be hijacked, but it'd be incredibly unlikely a bot could do so. Unless you make it easy for them to do so (you list session ID's of all users on the main page, XD but, if anyone did that, they'd deserve it). Even for people, finding another person's session ID isn't as easy as 123. So it's reasonable to say you can rely on sessions. Quote Link to comment https://forums.phpfreaks.com/topic/128772-solved-anti-bot-script/#findComment-668425 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.