/Development/RWS-20140417/DeploymentConfiguration/JavaScript/jQuery/jquery-validation-1.8.1/demo/captcha/rand.php
PHP | 11 lines | 4 code | 3 blank | 4 comment | 0 complexity | 9a1278d7ee6b2978335ca27896b4d517 MD5 | raw file
Possible License(s): LGPL-2.0, GPL-2.0, LGPL-2.1
- <?php
- // Create a random string, leaving out 'o' to avoid confusion with '0'
- $char = strtoupper(substr(str_shuffle('abcdefghjkmnpqrstuvwxyz'), 0, 4));
- // Concatenate the random string onto the random numbers
- // The font 'Anorexia' doesn't have a character for '8', so the numbers will only go up to 7
- // '0' is left out to avoid confusion with 'O'
- $str = rand(1, 7) . rand(1, 7) . $char;
- ?>