Skip to content

grayloon/geonames

Repository files navigation

PHP GeoNames API

Latest Version on Packagist Total Downloads

A simple Object Oriented wrapper for GeoNames API, written with PHP.

This project is a work in progress.

Requirements

  • PHP >= 7.1
  • GeoNames Account
  • (optional) PHPUnit to run tests.

Installation

You can install the package via composer:

composer require grayloon/geonames

Usage

An overview of available API parameters for each endpoint is available here.

    $geonames = new \Grayloon\Geonames('your_username');

    $result = $geonames->postalCodeSearch([
        'country' => 'US',
        'postalcode' => '47579',
    ]);  

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.