// Distributed under the GNU General Public Licence // ****************************************************************************** // how much time the images must be kept in local cache define ('CACHETIME', 3600); // parameters are crypted ? define ('CRYPT','0'); if (defined('CRYPT') && CRYPT){ require_once 'std.encryption.class.inc'; } require_once ('resizer.php'); $dimensions = getParameterValue ($_GET,'size'); $imgpath = getParameterValue ($_GET,'url'); $type = getParameterValue ($_GET,'type'); if (defined ('CRYPT') && CRYPT) { $resizepath= realpath(dirname(__FILE__).'/resize.php'); $key="UNIQUE-".filemtime($resizepath); $crypt = new encryption_class; $dimensions = $crypt->decrypt($key, $dimensions); $imgpath = $crypt->decrypt($key, $imgpath); } if (preg_match ("/resize\.php/i",$imgpath)) { header('HTTP/1.0 404 Page not found'); echo "PRRR"; exit(); } if ($dimensions && $imgpath) resizeAndOuput($dimensions, $imgpath,CACHETIME,$type); //echo $dimensions."-".$imgpath; ?>