diff options
| author | Andrew Dolgov <fox@madoka.volgo-balt.ru> | 2011-12-28 23:03:55 +0400 |
|---|---|---|
| committer | Andrew Dolgov <fox@madoka.volgo-balt.ru> | 2011-12-28 23:03:55 +0400 |
| commit | 487f0750c8d955c7994dc6180d1f56f26e1e9bf5 (patch) | |
| tree | 7e4dad73d1229e31ae09a6c9dd98bf84dc207e19 /image.php | |
| parent | 4cd3011163c9405845ccbff121c81486774b878b (diff) | |
workaround against markup being broken by cache_images()
Diffstat (limited to 'image.php')
| -rw-r--r-- | image.php | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -4,12 +4,14 @@ require_once "config.php"; - $filename = CACHE_DIR . '/images/' . sha1($_GET['url']) . '.png'; + $url = base64_decode($_GET['url']); + + $filename = CACHE_DIR . '/images/' . sha1($url) . '.png'; if (file_exists($filename)) { header("Content-type: image/png"); echo file_get_contents($filename); } else { - header("Location: " . $_GET['url']); + header("Location: $url"); } ?> |