addFilter( new ezcAuthenticationTokenFilter( $encryptedToken, 'sha1' ) ); if ( !$authentication->run() ) { // CAPTCHA was incorrect, so inform the user to try again, eventually // by generating another token and CAPTCHA image } else { // CAPTCHA was correct, so let the user send his spam or whatever } ?>