Add tile ID conversion php file
This commit is contained in:
parent
a4c7833d87
commit
105dc4d3da
@ -1,3 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$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();
|
||||||
|
|
||||||
|
$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);
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user