/**
  * 检验验证码
  * 
  * @param type $captcha
  * @return boolean 
  */
 public function checkCaptcha($captcha)
 {
     $captcha_time = Star_Cookie::get('ct');
     if ($this->encryptionCaptcha($captcha, $captcha_time) == Star_Cookie::get('captcha') && time() - $captcha_time < self::CAPTCHA_TIMEOUT) {
         return true;
     } else {
         return false;
     }
 }
Beispiel #2
0
 /**
  * 设置cookie域
  * @param unknown $domain
  */
 public static function setDomain($domain)
 {
     self::$domain = $domain;
 }