<?php
if (!defined('BLOG')) { die('Access Denied!'); }
include( ENGINE . '/classes/captcha.class.php' );
$types = array('jpg', 'gif', 'png');
$type = !empty($_GET['type']) ? (string) $_GET['type'] : 'gif';
if (!in_array($type, $types)) {
$type = 'gif';
}
$captcha = new KCAPTCHA( $type );
$_SESSION['captcha_key'] = $captcha->keystring;
die;
?>