ct2k7 Posted September 30, 2008 Share Posted September 30, 2008 Hi, how would I create a numbers captcha than can be used a a lot of pages. One variable could be username so, image.php?username=test displays a different image to image.php?username=hi. The captcha image generated would be a string of 4 random number like in the example pic I have posted. Thanks [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/126525-creating-a-numbers-captcha/ Share on other sites More sharing options...
Brian W Posted September 30, 2008 Share Posted September 30, 2008 Check out http://www.white-hat-web-design.co.uk/articles/php-captcha.php It works great, easy to use too. Link to comment https://forums.phpfreaks.com/topic/126525-creating-a-numbers-captcha/#findComment-654315 Share on other sites More sharing options...
ct2k7 Posted September 30, 2008 Author Share Posted September 30, 2008 Thanks brian - Bookmarked and very useful Link to comment https://forums.phpfreaks.com/topic/126525-creating-a-numbers-captcha/#findComment-654325 Share on other sites More sharing options...
Brian W Posted September 30, 2008 Share Posted September 30, 2008 Yep, read you thread and immediately went to my bookmarks and copied the URL. Good luck Link to comment https://forums.phpfreaks.com/topic/126525-creating-a-numbers-captcha/#findComment-654327 Share on other sites More sharing options...
PFMaBiSmAd Posted September 30, 2008 Share Posted September 30, 2008 Captcha's that ask simple questions (output as text on images) are more effective than captcha's that ask you to enter what you see. For a bot script to bypass the question/answer type of captcha requires them to both be able to decode the text in the image and then be able to give (match) the answer to the question. You should have a fairly large number of random questions that rotate in groups every couple of days to make it harder for someone to teach their bot script all the answers to your questions. If you use math or name/pick a shape questions, you can just generate the numbers/shapes... randomly. Link to comment https://forums.phpfreaks.com/topic/126525-creating-a-numbers-captcha/#findComment-654333 Share on other sites More sharing options...
ct2k7 Posted September 30, 2008 Author Share Posted September 30, 2008 Just one more thing - how would I use it if all of the processing was done on the same page: if (!empty($_POST['process-request'])) { whatever ;} Since the last time I tried using something similar, it broke what I was attempting to do. We would do that PFMaBiSmAd, however, we are not too bothered about a bot doing it, but just rather to deter people from using bots, since I don't think people would use a bot to achieve what the script processes. Link to comment https://forums.phpfreaks.com/topic/126525-creating-a-numbers-captcha/#findComment-654334 Share on other sites More sharing options...
Brian W Posted September 30, 2008 Share Posted September 30, 2008 The CaptchaSecurityImages.php creates a session... you check your $_POST['captcha_form'] against the $_SESSION['security_code']... Sorry if that is not what you meant. if(isset($_POST['captch_form'])) { if($_POST['captcha_form'] <> $_SESSION['security_code']) { die('Bad form input, or whatever'); }} Link to comment https://forums.phpfreaks.com/topic/126525-creating-a-numbers-captcha/#findComment-654356 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.