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