captcha.php 526 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * 生成验证码
  4. * Author:yuanjiang
  5. * Release Date: 2013-8-28
  6. **/
  7. header("Cache-Control: no-cache, must-revalidate");
  8. header("Pragma: no-cache");
  9. define('IN_T', true);
  10. require('./source/include/init.php');
  11. require('./source/include/cls_captcha.php');
  12. $act = Common::sfilter($_REQUEST['act']);
  13. if(!empty($act)){
  14. $rsi = new Captcha();
  15. $rsi->TFontSize=array(15,20);
  16. $rsi->Width=60;
  17. $rsi->Height=32;
  18. $code = $rsi->RandRSI();
  19. $_SESSION['captcha'][$act] = md5(strtolower($code));
  20. $rsi->Draw();
  21. exit;
  22. }
  23. ?>