Download the PHP package shivammathur/countrycity without Composer
On this page you can find all versions of the php package shivammathur/countrycity. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shivammathur/countrycity
More information about shivammathur/countrycity
Files in shivammathur/countrycity
Package countrycity
Short Description API to get all countries and all cities in a country.
License MIT
Homepage http://github.com/shivammathur
Informations about the package countrycity
Country City API
Geodata API to get the list of countries and cities in the world. This can be plugged in country and city picker drop-downs in forms. You can find a select2 implementation here. Code for this implementation is in example
directory.
:zap: Installing the CountryCity API
-
Make sure you have PHP 7.4 or newer.
-
Download this API using composer using the command below.
-
Then install the API by executing the command below.
- You are all set, you can use this API.
:hash: API Endpoints
All API responses are in json
format.
-
Get all countries
-
Get all countries containing a search keyword
-
Get all cities in a country
- Get all cities in a country containing a search keyword
:sparkles: Rest API Features
- Built using Slim micro framework.
- Caching enabled with following headers
- ETag
- Expires
- Last-Modified
- Fast and lightweight API
- PSR 7 Complaint
- CORS Middleware
:cloud: Hosting configuration
Here are the Configuration Instructions if you want to host this on your server.
:wrench: Error Format
If there is an error in the API, you will get an error in json
format as response
:rotating_light: Testing
:scroll: License
The scripts and documentation in this project are released under the dependencies and their licenses can be found in their respective repositories.
:+1: Contributions
Contributions are welcome! See Contributor's Guide.
:sparkling_heart: Support this project
- Please star the project and share it with the community.
- Support the project by sponsoring my work on GitHub sponsors.
All versions of countrycity with dependencies
ext-iconv Version *
ext-json Version *
ext-mbstring Version *
halaxa/json-machine Version *
slim/http-cache Version ^0.4.0
slim/php-view Version ^3.0
slim/slim Version ^3.12
symfony/event-dispatcher Version *
symfony/http-kernel Version *
symfony/process Version *