음성캡챠 적용중

This commit is contained in:
gnuboard committed 2013-01-02 18:48:58 +09:00
1 parent 12f45b6964
commit 2c8c36ffc3
25 files changed
+465

No files matched your search

+18
View 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;
}
}
?>