VPNkeyXchange-vxlan-test/index.php

16 lines
398 B
PHP

<?php
$lat = $_GET['lat'] ?? null;
$lo = $_GET['long'] ?? null;
$hoodid = $_GET['hoodid'] ?? null;
if (empty($hoodid)) {
if ((!is_numeric($lat)) || (!is_numeric($lo))) {exit("lat/long not numeric!");};
$hoodfile = shell_exec("./get_hood.sh $lat $lo");
}
else {
if ((!is_numeric($hoodid))) {exit("hoodid not numeric!");};
$hoodfile = shell_exec("./get_hoodid.sh $hoodid");
}
echo $hoodfile;
?>