<?php
$lat = 48.8583;
$lon = 2.2945;
$baseUrl = 'http://ws.geonames.org/findNearbyPlaceNameJSON?username=derick&style=full&';
$data = file_get_contents( "{$baseUrl}lat={$lat}&lng={$lon}" );
$data = json_decode( $data )->geonames[0];
echo $data->toponymName, ', ', $data->countryName, "\n";
echo $data->timezone->timeZoneId, "\n";
print_r( $data );
?>
Output
,
http://www.geonames.org/export/web-services.html#findNearbyPlaceName