hnschat-web/etc/avatar.php
2024-04-16 22:26:30 +00:00

14 lines
354 B
PHP

<?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);
}
?>