Download the PHP package jonasraoni/tld-to-iso without Composer
On this page you can find all versions of the php package jonasraoni/tld-to-iso. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download jonasraoni/tld-to-iso
More information about jonasraoni/tld-to-iso
Files in jonasraoni/tld-to-iso
Download jonasraoni/tld-to-iso
More information about jonasraoni/tld-to-iso
Files in jonasraoni/tld-to-iso
Vendor jonasraoni
Package tld-to-iso
Short Description Maps top level domains (TLD) against countries using the ISO 3166-1 alpha-2 format and vice-versa.
License MIT
Homepage http://github.com/jonasraoni/tld-to-iso
Package tld-to-iso
Short Description Maps top level domains (TLD) against countries using the ISO 3166-1 alpha-2 format and vice-versa.
License MIT
Homepage http://github.com/jonasraoni/tld-to-iso
Please rate this library. Is it a good library?
Informations about the package tld-to-iso
TLD <=> ISO
Mappings from top level domains (TLDs) to ISO 3166-1 alpha-2 and vice-versa.
Usage
Install the package:
The package provides 2 separated mappings (just to decrease the amount of processing/bloat data loaded into memory):
- JonasRaoni\TldToIso\IsoToTld
- JonasRaoni\TldToIso\TldToIso
Choose the one that fits your needs and call the static method get, it might return the right mapping or null if it's invalid.
Data Generation
To regenerate the classes, ensure the submodules are updated, then call the build.php script (just a simple code generator) and it will overwrite the existing classes.
Data Source
- The list of countries/TLDs was retrieved from this link: https://datahub.io/core/country-codes (the .csv is linked to this repository as a submodule). The list isn't complete, as it's missing IDN entries (e.g.
.рф) and custom domains (e.g..barcelona), but let it be... The Wikipedia's entry looks more complete, but I'll be unable to keep it synchronized.
All versions of tld-to-iso with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.2.0
The package jonasraoni/tld-to-iso contains the following files
Loading the files please wait ...