2020-04-14 18:10:19 +02:00
|
|
|
<?php
|
2020-04-25 15:56:50 +02:00
|
|
|
$x = intval($_GET['x']);
|
|
|
|
$y = intval($_GET['y']);
|
|
|
|
$z = intval($_GET['z']);
|
|
|
|
$id = preg_replace("/[^a-z0-9\-]/", "", $_GET['id']);
|
|
|
|
if (strlen($id) > 30) die();
|
2020-04-14 18:10:19 +02:00
|
|
|
|
2020-04-25 15:56:50 +02:00
|
|
|
$hdr = "Location: /maps.linux-forks.de/tiles/$id/$z/" . str_pad($y * (2**$z) + $x, 5, "0", STR_PAD_LEFT) . ".png";
|
|
|
|
if (isset($_GET["debug"])) {
|
|
|
|
echo $hdr;
|
|
|
|
} else {
|
|
|
|
header($hdr);
|
|
|
|
}
|
2020-04-14 18:10:19 +02:00
|
|
|
?>
|