음성캡챠 적용중
This commit is contained in:
18
plugin/captcha/get.php
Normal file
18
plugin/captcha/get.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
|
||||
define('MAX_CAPTCHA_COUNT', 3);
|
||||
$captcha_cnt = (int)$_SESSION['ss_captcha_cnt'];
|
||||
|
||||
if ($captcha_cnt >= MAX_CAPTCHA_COUNT) {
|
||||
$_SESSION['ss_captcha_key'] = '';
|
||||
echo false;
|
||||
} else {
|
||||
if ($_POST['captcha_key'] == $_SESSION['ss_captcha_key']) {
|
||||
echo true;
|
||||
} else {
|
||||
$_SESSION['ss_captcha_cnt'] = $captcha_cnt + 1;
|
||||
echo false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user