Source for file dpcaptcha.php
Documentation is available at dpcaptcha.php
* Shows a CAPTCHA code image for a given database Id.
* DutchPIPE version 0.4; PHP version 5
* LICENSE: This source file is subject to version 1.0 of the DutchPIPE license.
* If you did not receive a copy of the DutchPIPE license, you can obtain one at
* http://dutchpipe.org/license/1_0.txt or by sending a note to
* license@dutchpipe.org, in which case you will be mailed a copy immediately.
* @author Lennert Stock <ls@dutchpipe.org>
* @copyright 2006, 2007 Lennert Stock
* @license http://dutchpipe.org/license/1_0.txt DutchPIPE License
* @version Subversion: $Id: dpcaptcha.php 278 2007-08-19 22:52:25Z ls $
* @link http://dutchpipe.org/manual/package/DutchPIPE
? $_SERVER['SCRIPT_FILENAME'] : __FILE__ ) . '/../config');
require_once($config_dir . '/dpserver-ini.php');
require_once($config_dir . '/dpuniverse-ini.php');
* Gets I18N/L10 dp_text functionality (if enabled)
require_once(DPSERVER_LIB_PATH . 'dptext.php');
if (!isset ($_GET) || !isset ($_GET['captcha_id'])
"SELECT captchaFile FROM Captcha WHERE captchaId='"
. $_GET['captcha_id'] . "'"))
die(dp_text('Failed to retrieve CAPTCHA image information.<br />'));
if (FALSE === $captcha_image) {
die(dp_text('Failed to retrieve CAPTCHA image file.<br />'));
header('Content-Type: image/gif');
header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
|