Skip to content

Fetch city and state name by country code and zip code using GeoName API, cURL and PHP

License

Notifications You must be signed in to change notification settings

larrydanny/curlPhpGeonamesApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fetch city and state name by country code and zip code using GeoName API, cURL and PHP

How to use?

In js/ folder there have one file named custom.js. there line 22 need to change the username.

var username = 'your username'; // please change the username with your username

For demo click here

How to get GeoNames API username?

  1. need to create an account if not any. please click here for new account.
  2. need to confirm email address.
  3. username is important here. username needs to passed as parameter.
  4. for using free webservices your username must have to enable.
  5. for login click here. To enable click here and see in bottom you will see a text "Click here to enable.". Just click the link and your username ready to use.