14 lines
473 B
PHP
14 lines
473 B
PHP
<?php
|
|
const INCLUDER = true;
|
|
require_once __DIR__ . '/lib.php';
|
|
|
|
if(!isset($_GET['json'])){
|
|
header('Content-Type: application/xml');
|
|
header('Access-Control-Allow-Origin: https://gpx.studio');
|
|
echo UplinkData::makeGPX($_GET['device'] ?? '', $_GET['from'] ?? '', $_GET['to'] ?? '');
|
|
}else{
|
|
header('Content-Type: application/json');
|
|
echo json_encode(UplinkData::makePositions($_GET['device'] ?? '', $_GET['from'] ?? '', $_GET['to'] ?? ''),128);
|
|
}
|
|
exit(0);
|