Jump to content

creating a numbers captcha


ct2k7

Recommended Posts

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

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.

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.

 

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'); }}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.