xref: /plugin/captcha/img.php (revision 42a2703562299943bcc8eae0ecff13d55fd9061c)
1<?php
2/**
3 * CAPTCHA antispam plugin - Image generator
4 *
5 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
6 * @author     Andreas Gohr <gohr@cosmocode.de>
7 */
8
9if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../../').'/');
10define('NOSESSION',true);
11define('DOKU_DISABLE_GZIP_OUTPUT', 1);
12require_once(DOKU_INC.'inc/init.php');
13require_once(DOKU_INC.'inc/auth.php');
14require_once(dirname(__FILE__).'/action.php');
15
16$ID = $_REQUEST['id'];
17$plugin = new action_plugin_captcha();
18$rand = PMA_blowfish_decrypt($_REQUEST['secret'],auth_cookiesalt());
19$code = $plugin->_generateCAPTCHA($plugin->_fixedIdent(),$rand);
20$plugin->_imageCAPTCHA($code);
21
22//Setup VIM: ex: et ts=4 enc=utf-8 :
23