Download the PHP package mledoze/countries without Composer

On this page you can find all versions of the php package mledoze/countries. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package countries

World countries in JSON, CSV, XML and YAML.

License Build Status

Latest Stable Version npm downloads

Latest Stable Version PHP from Packagist Packagist downloads

Countries data

This repository contains a list of world countries, as defined by ISO Standard 3166-1, in JSON, CSV, XML and YAML. Warning: not all entities in this project are independent countries; refer to the independent property to know if the country is considered a sovereign state.

Each line contains the country:

Additional data

The data folder contains additional data such as the countries GeoJSON outlines and flags in SVG format.

Examples

JSON
GeoJSON and TopoJSON outlines

See an example for Germany: GeoJSON or TopoJSON.

CSV
XML
YAML

Customising the output

The data files provided in the dist directory include all available fields, but is also possible to build a custom version of the data with certain fields excluded.

To do this, you will first need a working PHP installation, composer and a local copy of this repository. Once you have these, open a terminal in your local version of this project's root directory and run this command to install the necessary dependencies:

After this finishes, run the following command (here we will exclude the tld field from the output, but you can exclude any field you want):

You can also exclude multiple fields:

If you prefer to include only some fields (this can not be combined with --exclude-field):

The generated files are put into the dist directory, but you can change this to another existing directory:

You can also choose to only generate some of the output formats:

Showcase

Projects using this dataset:

How to contribute?

Please refer to CONTRIBUTING.

To do

Sources

https://www.currency-iso.org/ for currency codes.

Region and subregion are taken from https://github.com/hexorx/countries.

GeoJSON outlines come from http://thematicmapping.org/downloads/world_borders.php.

The rest comes from Wikipedia.

Credits

Thanks to:

License

See LICENSE.

Flags are not licensed under the ODbL license; see https://en.wikipedia.org/wiki/Wikipedia:Copyright_on_emblems for more information.


All versions of countries with dependencies

PHP Build Version
Package Version
Requires ext-dom Version *
ext-gettext Version *
php Version >=8.1
symfony/console Version ~5.4|~6.3
symfony/yaml Version ~5.4|~6.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mledoze/countries contains the following files

Loading the files please wait ....