Avocado.CommunityEdition/AvocadoEdition/plugin/kcaptcha/kcaptcha_session.php
TATECK 9c60c33cd6 최초 배포
Ver.02.2.2
2022-02-09 03:05:24 +09:00

18 lines
No EOL
529 B
PHP

<?php
include_once("_common.php");
include_once(dirname(__FILE__).'/kcaptcha_config.php');
include_once('captcha.lib.php');
while(true){
$keystring='';
for($i=0;$i<$length;$i++){
$keystring.=$allowed_symbols{mt_rand(0,strlen($allowed_symbols)-1)};
}
if(!preg_match('/cp|cb|ck|c6|c9|rn|rm|mm|co|do|cl|db|qp|qb|dp|ww/', $keystring)) break;
}
set_session("ss_captcha_count", 0);
set_session("ss_captcha_key", $keystring);
$captcha = new KCAPTCHA();
$captcha->setKeyString(get_session("ss_captcha_key"));
?>