/ Published in: PHP
Tell the users to enter only the red or only the blue digits, not everything they see.
Most bots will try to enter everything, displayed on the images.
To check is captcha code entered correctly, use $_SESSION['captcha']['red'] to check the red digits only and $_SESSION['captcha']['blue'] to check the blue digits only. Good luck !
Most bots will try to enter everything, displayed on the images.
To check is captcha code entered correctly, use $_SESSION['captcha']['red'] to check the red digits only and $_SESSION['captcha']['blue'] to check the blue digits only. Good luck !
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$width = 146; $height = 30; for($i=0; $i<($width*$height)/3; $i++) { } /* generate random lines in background */ for($i=0; $i<($width*$height)/150; $i++ ) { } $_SESSION['captcha']['blue'] = $_SESSION['captcha']['red'] = ''; if(($j%2) == 1) { $_SESSION['captcha']['blue'] .= $text[$j]; } else { $_SESSION['captcha']['red'] .= $text[$j]; } }
URL: http://vladimir-ivanov.net