示例#1
0
function post_notification_check_captcha()
{
    if (get_option('post_notification_captcha') == 0) {
        return true;
    }
    if ($_POST['captchacode'] == '') {
        return false;
    }
    if ($_POST['captcha'] == '') {
        return false;
    }
    require_once POST_NOTIFICATION_PATH . 'class.captcha.php';
    $my_captcha = new captcha($_POST['captchacode'], POST_NOTIFICATION_PATH . '_temp');
    return $my_captcha->verify($_POST['captcha']);
}
示例#2
0
 /**
  * @description Validating captcha string
  */
 function validate()
 {
     $this->assertTrue(captcha::verify($this->captchatext, $this->captchaid));
 }