bit64 / geonames
GeoNames API library for PHP
dev-dev-master
2020-08-05 22:33 UTC
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^7.0
- symfony/cache: ^5.1
Requires (Dev)
- phpunit/phpunit: ^9.2
This package is auto-updated.
Last update: 2024-10-06 07:46:12 UTC
README
This library aims to aggregate the GeoNames API as well as compile a locally stored geo database service from the GeoNames data dump.
The GeoNames geographical database covers all countries and contains over eleven million placenames that are available for download free of charge.
Usage
use Bit64\GeoNames\GeoNamesApi;
$api = new GeoNamesApi([
'username' => 'demo',
'lang' => 'en',
]);
$lookup = $api->get([
'geonameId' => 3369157,
]);
print($lookup['name']);
// Output
Cape Town
Read the documentation for more information.
This library may not be a complete work, as it is going to be continually developed until it meets the requirements for its general intended purpose
License
For the full copyright and license information, please view the LICENSE file that was distributed with this source code.