2 set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
5 require_once "config.php";
7 // backwards compatible wrapper for old-style image caching
8 /* if (isset($_GET['url'])) {
9 $url = base64_decode($_GET['url']);
11 $filename = CACHE_DIR . '/images/' . sha1($url) . '.png';
13 if (file_exists($filename)) {
14 header("Content-type: image/png");
15 echo file_get_contents($filename);
17 header("Location: $url");
23 @$hash = basename($_GET['hash']);
27 $filename = CACHE_DIR . '/images/' . $hash . '.png';
29 if (file_exists($filename)) {
30 header("Content-type: image/png");
31 echo file_get_contents($filename);
33 header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
34 echo "File not found.";