Download the PHP package katmore/tld-enum without Composer
On this page you can find all versions of the php package katmore/tld-enum. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download katmore/tld-enum
More information about katmore/tld-enum
Files in katmore/tld-enum
Package tld-enum
Short Description Lists of every ICANN TLD in multiple formats
License MIT GPL-3.0+
Homepage https://github.com/katmore/tld-enum
Informations about the package tld-enum
TLD Enumerations
Lists of every IANA TLD in various formats. The lists may be continuously updated using the included update utility that pulls the latest data from IANA.
- CSV Format
- All Format Files
- Updating the Format Files
- Node Usage
- PHP Usage
Usage
Because the lists are provided in universial CSV and JSON formats, they can be easily utilitized in most programming environments. Additionally, for convenience, some native programming language formats have also been provided.
- Node Usage
- More Node Examples
- PHP Usage
- More PHP Examples
Node Usage
-
use npm to add the
tld-enum
package to your project -
add the module to your source
-
access the list by using the
tldEnum.tldList
arrayThe following example...
Should produce the following output...
More Node Examples
- js-demo.js Demo using the simple array of every TLD in JavaScript.
- js-desc-demo.js Demo using the TLD description hashmap in JavaScript.
- js-type-demo.js Demo using the TLD type hashmap in JavaScript.
- js-info-demo.js Demo using the array of TLD info hashmaps in JavaScript.
PHP Usage
-
use composer to add the
katmore/tld-enum
package to your project -
access the list by using the
\TldEnum\TldList::TLD_LIST
class constant arrayThe following example...
Should produce the following output...
More PHP Examples
- php-demo.php Demo using the simple array of every TLD in PHP.
- php-TldDesc-demo.php Demo using the TLD description hashmap in PHP.
- php-TldType-demo.php Demo using the TLD type hashmap in PHP.
- php-TldInfo-demo.php Demo using the array of TLD info hashmaps in PHP.
TLD List Formats
-
CSV: tlds.csv
A CSV file providing a row for every IANA TLD with the following three columns: domain (TLD), description, and type.
-
PHP
-
TldList.php
A PHP source file providing a class constant array comprised of every IANA TLD.
-
TldDesc.php
A PHP source file providing a class constant assoc array with a key for every IANA TLD and the corresponding TLD's "description" as the value.
-
TldType.php
A PHP source file providing a class constant assoc array with a key for every IANA TLD and the corresponding TLD's "type" as the value.
-
TldInfo.php
A PHP source file providing a class constant array of "info" assoc array elements of every IANA TLD.
-
-
JSON
-
tld-list.json
A JSON formatted array comprised of every IANA TLD.
-
tld-desc.json
A JSON formatted object with a property for every IANA TLD and the corresponding TLD's "description" as the value.
-
tld-type.json
A JSON formatted object with a property for every IANA TLD and the corresponding TLD's "type" as the value.
-
tld-info.json
A JSON formatted array of "info" object elements of every IANA TLD.
-
-
JavaScript
-
list.js
An export module with an array comprised of every IANA TLD.
-
desc.js
An export module with an object containing a property for every IANA TLD and the corresponding TLD's "description" as the value.
-
type.js
An export module with an object containing a property for every IANA TLD and the corresponding TLD's "type" as the value.
-
info.js
An export module with an array comprised of "info" object elements of every IANA TLD.
-
Updating the TLD format files
All TLD Update Utility.
TLD Update Utility Prerequisites
- Node.js version 8.11 or higher.
- (Optional) PHP command-line version 7.2 or higher, to re-generate the PHP format files.
-
The devDependencies from package.json must be available.
-
If tld-enum was installed in an outside project using npm, then the tld-enum dev dependencies must be installed manually, as in the following example:
- If tld-enum was installed in an outside project using npm, then the TLD Update Utility can be executed from the node_module directory, as in the following example:
-
TLD Update Utility Usage
TLD Update Helpers
Internally, the TLD Update Utility uses multiple "helper" scripts to generate the full set of native format lists. These individual "helper" scripts should not be directly executed except for development and troubleshooting purposes.
Legal
The source code in this project is based on a fork of certain source code originally from the incognico/list-of-top-level-domains project, as retrieved on 2017-12-04, which was published to the public domain.
Copyright
TLD Enumerations - https://github.com/katmore/tld-enum
The following copyright notice applies to all resources in this project unless specifically noted otherwise:
Copyright (c) 2017-2018 Doug Bird. All Rights Reserved.
License
All resources in the TLD Enumerations project are copyrighted free software unless specifically noted otherwise.
You may redistribute and modify it under either the terms and conditions of the "The MIT License (MIT)"; or the terms and conditions of the "GPL v3 License". See GPLv3.
These licensing conditions do not apply to any resources that have been released into the public domain; which are listed in the README document.
Public Domain Resources
The following resources of this project are hereby released into the public domain:
- tlds.csv
- formats/js/tld-enum/list.js
- formats/js/tld-enum/desc.js
- formats/js/tld-enum/info.js
- formats/js/tld-enum/type.js
- formats/json/tld-list.json
- formats/json/tld-desc.json
- formats/json/tld-info.json
- formats/json/tld-type.json
- formats/php/TldEnum/TldList.php
- formats/php/TldEnum/TldDesc.php
- formats/php/TldEnum/TldInfo.php
- formats/php/TldEnum/TldType.php
- assets/tld-desc.csv