Welcome Guest, Not a member yet? Register   Sign In
Implementation of captcha in sign up form
#4

[eluser]Thorpe Obazee[/eluser]
Code:
if ($word == '')
   {
        $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';

        $str = '';
        for ($i = 0; $i < 8; $i++)
        {
            $str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
        }
        
        $word = $str;
   }

I believe the 8 (8-1) is the word count.


Messages In This Thread
Implementation of captcha in sign up form - by El Forum - 05-20-2009, 12:03 AM
Implementation of captcha in sign up form - by El Forum - 05-20-2009, 12:05 AM
Implementation of captcha in sign up form - by El Forum - 05-20-2009, 03:37 AM
Implementation of captcha in sign up form - by El Forum - 05-20-2009, 03:40 AM
Implementation of captcha in sign up form - by El Forum - 05-20-2009, 04:01 AM
Implementation of captcha in sign up form - by El Forum - 05-20-2009, 04:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB