]> git.wh0rd.org - tt-rss.git/blob - image.php
daemon: assume child is dead if its lockfile is unlocked (refs #417)
[tt-rss.git] / image.php
1 <?php
2 set_include_path(get_include_path() . PATH_SEPARATOR .
3 dirname(__FILE__) . "/include");
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 ?>