5 Jappix - An open social platform
6 This is the Jappix geolocation script
8 -------------------------------------------------
12 Last revision: 15/01/12
17 define('JAPPIX_BASE', '..');
19 // Get the needed files
20 require_once('./functions.php');
21 require_once('./read-main.php');
22 require_once('./read-hosts.php');
24 // Optimize the page rendering
28 // Not allowed for a special node
29 if(isStatic() || isUpload())
32 // If valid data was sent
33 if((isset($_GET['latitude']) && !empty($_GET['latitude'])) && (isset($_GET['longitude']) && !empty($_GET['longitude'])) && (isset($_GET['language']) && !empty($_GET['language']))) {
35 header('Content-Type: text/xml; charset=utf-8');
37 // Get the XML content
38 $xml = read_url('http://maps.googleapis.com/maps/api/geocode/xml?latlng='.urlencode($_GET['latitude']).','.urlencode($_GET['longitude']).'&language='.urlencode($_GET['language']).'&sensor=true');