PHP code example of grayloon / geonames

1. Go to this page and download the library: Download grayloon/geonames library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

grayloon / geonames example snippets

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

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