protected function generateCode()
    {
        $code = '';

        for($i = 1, $cslen = $this->strlen($this->charset); $i <= $this->code_length; ++$i) {
            $code .= $this->substr($this->charset, mt_rand(0, $cslen - 1), 1);
        }

        return $code;
    }
protected function generateCode()
    {
        $code = '';

        for($i = 1, $cslen = $this->strlen($this->charset); $i <= $this->code_length; ++$i) {
            $code .= $this->substr($this->charset, mt_rand(0, $cslen - 1), 1);
        }

        return $code;
    }
protected function generateCode ( ) { $ code = '' ; for ( $ i = 1 , $ cslen = $ this -> strlen ( $ this -> charset ) ; $ i <= $ this -> code_length ; ++ $ i ) { $ code .= $ this -> substr ( $ this -> charset , mt_rand ( 0 , $ cslen - 1 ) , 1 ) ; } return $ code ; }
Generates a random captcha code from the set character set

@see Securimage::$charset  Charset option
@return string A randomly generated CAPTCHA code
Generates a random captcha code from the set character set