]> git.wh0rd.org - tt-rss.git/blame - image.php
Merge pull request #19 from plaidfluff/7e454e815dd67f0ac3804e213599be9bbbc2755e
[tt-rss.git] / image.php
CommitLineData
236ac05c 1<?php
3c696512 2 set_include_path(get_include_path() . PATH_SEPARATOR .
f03a795d 3 dirname(__FILE__) . "/include");
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?>