PHP Classes

GeoNames PHP API: Search for geographic places using GeoNames API

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 74 All time: 10,202 This week: 455Up
Version License PHP version Categories
geo-name-search 1.0GNU General Publi...5PHP 5, Searching, Web services, Geogr...
Description 

Author

This class can search for geographic places using GeoNames API.

It can send HTTP requests to the GeoNames API Web server to perform searches for geographic locations.

Currently, it can retrieve the:

- States of a given country

- Cities with a given name

The class can cache the query results to avoid calling the GeoNames API multiple times to query the same information.

Picture of Ujah Chigozie peter
  Performance   Level  
Innovation award
Innovation award
Nominee: 11x

 

Documentation

geo-name-search

Php Geoname search wrapper, to help reduce too much api call

Installation

Installation is super-easy via Composer:

composer require peterujah/geo-name-search

USAGES

First you have to create an account with geoname to acquire api username http://www.geonames.org/export/geonames-search.html

Initialize GeoNameSearch with geoname api username

$geo = new \Peterujah\NanoBlock\GeoNameSearch("username");

List all states in any country Nigeria

$geo->states("Nigeria");

List all cities in any sates Enugu

$geo->cities("Enugu");

Search geoname with query and country

$geo->query("Query", "Country");

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 100%
Total:74
This week:0
All time:10,202
This week:455Up