]> git.wh0rd.org - tt-rss.git/blame - image.php
modify include path order (closes #514)
[tt-rss.git] / image.php
CommitLineData
236ac05c 1<?php
88e8fb3a
AD
2 set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
3 get_include_path());
107d0cf3 4
bc0f0785 5 require_once "config.php";
236ac05c 6
487f0750
AD
7 $url = base64_decode($_GET['url']);
8
9 $filename = CACHE_DIR . '/images/' . sha1($url) . '.png';
3c696512
AD
10
11 if (file_exists($filename)) {
12 header("Content-type: image/png");
13 echo file_get_contents($filename);
14 } else {
487f0750 15 header("Location: $url");
3c696512 16 }
236ac05c 17?>