Files
LORAWAN-GPS-Tracker/gpx.php
Holger Sielaff e2eeeaefcd Added files
2025-06-28 16:23:47 +02:00

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);