code.ctrl.php 485 B

123456789101112131415161718
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. defined('IN_IA') or exit('Access Denied');
  7. error_reporting(0);
  8. load()->classs('captcha');
  9. session_start();
  10. $captcha = new Captcha();
  11. $captcha->build(150, 40);
  12. $key = complex_authkey();
  13. $hash = md5(strtolower($captcha->phrase) . $key);
  14. isetcookie('__code', $hash);
  15. $_SESSION['__code'] = $hash;
  16. $captcha->output();