1. Go to this page and download the library: Download prophet777/countries library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
prophet777 / countries example snippets
sh
php countries.php convert --exclude-field=tld
sh
php countries.php convert --exclude-field=tld --exclude-field=cca2
# Or using the shorter `-x` syntax:
php countries.php convert -x tld -x cca2
sh
php countries.php convert --syntax:
php countries.php convert -i=name -i=area
sh
mkdir foobar
php countries.php convert --output-dir=foobar
sh
mkdir foobar
php countries.php convert --format=json_unescaped --format=csv
# or using the shorter `-f` syntax:
php countries.php convert -f json_unescaped -f csv
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.