diff --git a/config.dist.php b/config.dist.php index be67eeb..a3ebe93 100644 --- a/config.dist.php +++ b/config.dist.php @@ -5,4 +5,6 @@ $username = "username"; $password = "password"; $dbname = "database"; +$endpoint = True; $access = False; +$location = False; diff --git a/endpoint.php b/endpoint.php index b91222a..1df3f5a 100644 --- a/endpoint.php +++ b/endpoint.php @@ -2,6 +2,10 @@ require_once("config.php"); +if (!$endpoint) { + die("Endpoint not enabled in config. You should do something about that.") +} + if (isset($_GET["lat"]) && preg_match("/^-?\d+\.\d+$/", $_GET["lat"]) && isset($_GET["lon"]) && preg_match("/^-?\d+\.\d+$/", $_GET["lon"]) && isset($_GET["device"]) ) { $conn = new mysqli($servername, $username, $password, $dbname); diff --git a/location.php b/location.php new file mode 100644 index 0000000..e69de29