VPNkeyXchange-vxlan-test/index.php

20 lines
498 B
PHP

<?php
$lat = $_GET['lat'] ?? null;
$lo = $_GET['long'] ?? null;
$hoodid = $_GET['hoodid'] ?? null;
if (empty($hoodid)) {
if (preg_match("/^[0-9.]*$/", $lat) and preg_match("/^[0-9.]*$/", $lo)) {
$hoodfile = shell_exec("./get_hood.sh $lat $lo");
}
else {
echo "coordinates not numeric! ";
}
}
else {
if ((!is_numeric($hoodid))) {exit("hoodid not numeric!");};
$hoodfile = shell_exec("./get_hoodid.sh $hoodid");
}
echo $hoodfile;
?>