PHP game server for TerranQuest (version 1) https://terranquest.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

20 lines
576 B

<?php
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']), TRUE);
if (!is_empty($terrain['error'])) {
sendError($terrain['error'], true);
} else {
$out = [
"status" => "OK",
"type" => $terrain['type'],
"latitude" => $terrain['latitude'],
"longitude" => $terrain['longitude'],
"name" => $terrain['name']
];
die(json_encode($out));
}