source: extensions/EasyCaptcha/drag/get.php @ 24215

Revision 24215, 588 bytes checked in by mistic100, 6 years ago (diff)

add extension EasyCaptcha

Line 
1<?php
2define('PHPWG_ROOT_PATH', '../../../');
3include(PHPWG_ROOT_PATH . 'include/common.inc.php');
4
5defined('EASYCAPTCHA_ID') or die('Hacking attempt!');
6include_once(EASYCAPTCHA_PATH . 'drag/functions_drag.inc.php');
7
8if (count($_GET) != 2) die('Hacking attempt!');
9
10list($theme, $image) = array_keys($_GET);
11
12$image = easycaptcha_decode_image_url($image);
13
14if (@file_exists(EASYCAPTCHA_PATH.'drag/'.$theme.'/'.$image))
15{
16  $ext = get_extension($image);
17  if ($ext == 'jpg') $ext = 'jpeg';
18
19  header('Content-Type: image/'.$ext);
20  readfile(EASYCAPTCHA_PATH.'drag/'.$theme.'/'.$image);
21}
Note: See TracBrowser for help on using the repository browser.