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