From 1c5483b3c2c861e0a5d1762c681fdcb43a384a5e Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Mon, 3 Oct 2016 17:01:22 -0600 Subject: [PATCH] getterrain.php output variable names now same as GIS API output. (issue #3) --- getterrain.php | 6 +++--- proximity.php => nearby.php | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename proximity.php => nearby.php (100%) diff --git a/getterrain.php b/getterrain.php index ddd8cef..794a699 100644 --- a/getterrain.php +++ b/getterrain.php @@ -4,17 +4,17 @@ require 'required.php'; require 'onlyloggedin.php'; require 'latlong_validate.php'; -$terrain = json_decode(file_get_contents("http://gis.terranquest.net/terrain.php?key=" . GIS_API_KEY . "&lat=" . $VARS['lat'] . "&long=" . $VARS['long'])); +$terrain = json_decode(file_get_contents("http://gis.terranquest.net/terrain.php?key=" . GIS_API_KEY . "&lat=" . $VARS['lat'] . "&long=" . $VARS['long']), TRUE); if (!is_empty($terrain['error'])) { sendError($terrain['error'], true); } else { $out = [ "status" => "OK", - "typeid" => $terrain['type'], + "type" => $terrain['type'], "latitude" => $terrain['latitude'], "longitude" => $terrain['longitude'], - "typename" => $terrain['name'] + "name" => $terrain['name'] ]; die(json_encode($out)); } \ No newline at end of file diff --git a/proximity.php b/nearby.php similarity index 100% rename from proximity.php rename to nearby.php