<?php
require_once dirname(__FILE__) . "/session/session_mysql.php";
require_once dirname(__FILE__) . "/captcha.php";

unset($_SESSION["dd_ckstr"]);
unset($_SESSION["dd_ckstr_last"]);
$captcha = new Captcha();

//Firefox部份情况会多次请求的问题，5秒内刷新页面将不改变session
$ntime = time();
$_SESSION['dd_ckstr'] = strtoupper($captcha->getCode());
$_SESSION['dd_ckstr_last'] = $ntime;

$captcha->render();
?>