Added files

This commit is contained in:
Holger Sielaff
2025-06-28 16:23:47 +02:00
parent 21a2714401
commit e2eeeaefcd
8 changed files with 328 additions and 0 deletions

13
gpx.php Normal file
View File

@@ -0,0 +1,13 @@
<?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);