예제 #1
0
파일: captcha.php 프로젝트: rasuldev/torino
 public function SetCaptchaCode($sid = false)
 {
     $max = count($this->arChars);
     $this->code = "";
     for ($i = 0; $i < $this->codeLength; $i++) {
         $this->code .= $this->arChars[rand(1, $max) - 1];
     }
     $this->sid = $sid === false ? $this->Generate32RandomString() : $sid;
     CCaptcha::Add(array("CODE" => $this->code, "ID" => $this->sid));
 }