PHP Classes

PHP Country and State List Geo Data: Get the list of world countries and their states

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 109 All time: 9,664 This week: 51Up
Version License PHP version Categories
geodata 1.0.0Shareware5PHP 5, Geography
Description 

Author

This class can get the list of world countries and their states.

It provides configuration scripts with information about 246 world countries like the country name, country code, country phone prefix, and state names.

The class can return the complete list of countries and their codes and the list of states of a country with a given identifier.

Picture of Ahmad Mustapha
Name: Ahmad Mustapha <contact>
Classes: 24 packages by
Country: Nigeria Nigeria
Innovation award
Innovation award
Nominee: 9x

 

Documentation

GeoData

A simple class that provides access to country & state list.

Installation

composer require ahmard/geodata

Usage

<?php

use Ahmard\GeoData\Country;

require __DIR__ . '/vendor/autoload.php';

$countries = Country::all();

$states = Country::getStates(160);

var_dump($states);

  Files folder image Files (251)  
File Role Description
Files folder imageraw (1 file, 1 directory)
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:109
This week:0
All time:9,664
This week:51Up