1234567891011121314151617181920212223242526272829303132 |
- <?php
- use core\extend\code\Code;
- require dirname(__FILE__) . '/init.php';
- $form = $_SERVER['HTTP_REFERER'];
- $host = $_SERVER['HTTP_HOST'];
- if ($form && strpos($form, '://' . $host) != 4 && strpos($form, '://' . $host) != 5) {
- die('非法调用验证码!');
- }
- session_start();
-
- $code = new Code();
- $code->height = 45;
- $code->width = 120;
- $code->fontsize = 18;
- $code->charset = 'abcdefghkmnprtuvwxy23456789ABCDEFGHKMNPRTUVWXY';
- $code->doimg();
- session('checkcode', $code->getCode());
|