You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
472 B
PHTML
20 lines
472 B
PHTML
5 years ago
|
<?php
|
||
|
|
||
|
require_once __DIR__ . "/../settings.php";
|
||
|
|
||
|
$format = end(explode(".", $_SERVER['REQUEST_URI']));
|
||
|
|
||
|
header("Access-Control-Allow-Origin: *");
|
||
|
|
||
|
switch ($format) {
|
||
|
case "json":
|
||
|
header("Content-Type: application/json");
|
||
|
echo json_encode(["min_version" => $SETTINGS["minimum_client_version"]]);
|
||
|
break;
|
||
|
case "txt":
|
||
|
default:
|
||
|
header("Content-Type: text/plain");
|
||
|
echo $SETTINGS["minimum_client_version"];
|
||
|
break;
|
||
|
|
||
|
}
|