zhangy Posted December 15, 2008 Share Posted December 15, 2008 Hello, I have a human intelligence identifier script but I want it to generate random labels. Preferably numbers between 1 and 10 that add together to from what will be the answer that the user enters. <lable for="captcha>1+2=</lable> Can anyone help? Link to comment https://forums.phpfreaks.com/topic/137008-hii-captcha/ Share on other sites More sharing options...
btherl Posted December 15, 2008 Share Posted December 15, 2008 rand(1,10) will give you a random number between 1 and 10. Link to comment https://forums.phpfreaks.com/topic/137008-hii-captcha/#findComment-715607 Share on other sites More sharing options...
zhangy Posted December 15, 2008 Author Share Posted December 15, 2008 Cool thanks Btherl. Does anyone know how to apply this; get the random numbers to add together to equal the captcha answer? Link to comment https://forums.phpfreaks.com/topic/137008-hii-captcha/#findComment-715623 Share on other sites More sharing options...
Yesideez Posted December 15, 2008 Share Posted December 15, 2008 If you want to use an image captcha, here's one I made... http://www.coderprofile.com/networks/source-codes/535/simple-but-highly-effective-captcha Link to comment https://forums.phpfreaks.com/topic/137008-hii-captcha/#findComment-715631 Share on other sites More sharing options...
zhangy Posted December 15, 2008 Author Share Posted December 15, 2008 Thanks Yesideez, however I still would like to know more about the method I originally posted about Link to comment https://forums.phpfreaks.com/topic/137008-hii-captcha/#findComment-715642 Share on other sites More sharing options...
beansandsausages Posted December 15, 2008 Share Posted December 15, 2008 sumit like this? $number1 = rand(1,10); $number2 = rand(1,10); $answer = $number1 + $number2; echo "<form action=\"?mod=cat\" method=\"POST\" /> what is {$number1} + {$number2}? <input type=\"text\" name=\"asn\" id=\"asn\" /> <input type=\"submit\" value=\"submit\" /> "; if($_GET['mod'] == "cat" ) { $myanswer = (int)$_POST['asn']; if($myanswer == $answer ) { echo " Right "; } else { echo " Wrong "; } } That is the idea i would use but im not the best in the world. BUT since computers are designed to do math that would be easily cracked thus doing nothing. Link to comment https://forums.phpfreaks.com/topic/137008-hii-captcha/#findComment-715702 Share on other sites More sharing options...
PFMaBiSmAd Posted December 15, 2008 Share Posted December 15, 2008 Text based math questions are very easy for php to find in the source of the page and directly solve using one built in php function without any real programming skill required and should not be used. Link to comment https://forums.phpfreaks.com/topic/137008-hii-captcha/#findComment-715708 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.