minecraft/minecolonies-1.20.1/data/dynmap/web/gettiles.php

23 lines
380 B
PHP
Raw Normal View History

2024-08-19 10:14:15 -04:00
<?php
define('TILESPATH', 'tiles/');
$path = $_SERVER['PATH_INFO'];
$fname = TILESPATH . $path;
if (!file_exists($fname)) {
$fname = "images/blank.png";
}
$fp = fopen($fname, 'rb');
if (strstr($path, ".png")) {
header("Content-Type: image/png");
} else {
header("Content-Type: image/jpeg");
}
header("Content-Length: " . filesize($fname));
fpassthru($fp);
exit;