mirror of
https://github.com/Nathanwoodburn/hnschat-web.git
synced 2026-01-30 13:23:01 +11:00
v2
This commit is contained in:
14
etc/avatar.php
Normal file
14
etc/avatar.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
include "includes.php";
|
||||
|
||||
$id = $_GET["id"];
|
||||
$avatarFile = $GLOBALS["path"]."/etc/avatars/".$id;
|
||||
|
||||
$domainInfo = domainForID($id);
|
||||
if (@$domainInfo && @$domainInfo["avatar"] && file_exists($avatarFile)) {
|
||||
$image = file_get_contents($avatarFile);
|
||||
$type = mime_content_type($avatarFile);
|
||||
header("Content-Type: ".$type);
|
||||
die($image);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user