ghost
3 years ago
13 changed files with 70 additions and 49 deletions
Binary file not shown.
@ -1,21 +0,0 @@
@@ -1,21 +0,0 @@
|
||||
<?php |
||||
|
||||
if (isset($_GET['hash'])) { |
||||
|
||||
$fileName = md5($_GET['hash']); |
||||
$filePath = PROJECT_DIR . '/cache/image/' . $fileName . '.jpeg'; |
||||
|
||||
if (!file_exists($filePath)) { |
||||
|
||||
$icon = new Icon(); |
||||
$image = $icon->generateImageResource($fileName, 42, 42, false); |
||||
|
||||
file_put_contents($filePath, $image); |
||||
} |
||||
|
||||
$image = file_get_contents($filePath); |
||||
|
||||
header("Content-Type: image/jpeg"); |
||||
|
||||
echo $image; |
||||
} |
Loading…
Reference in new issue