Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (20 sloc) 0.447 kb
<?php
/**
* Quick-wrapper for implementing the geo2city function
*/
if (isset($_REQUEST['format'])) {
include 'geo2city.php';
switch ($_REQUEST['format']) {
case 'xml':
header("Content-type: text/xml; charset=utf-8");
break;
case 'json':
header("Content-type: application/json; charset=utf-8");
break;
case 'human':
break;
default:
die('An error has occurred.');
}
geo2city($_REQUEST['loc'], $_REQUEST['format']);
}
Jump to Line
Something went wrong with that request. Please try again.