list-of-top-level-domains/README.md

75 lines
2.9 KiB
Markdown
Raw Normal View History

2017-12-14 05:26:09 +00:00
# TLD Enumerations
2012-10-27 11:41:50 +00:00
2017-12-14 05:26:09 +00:00
Lists of every [IANA TLD](http://data.iana.org/TLD/tlds-alpha-by-domain.txt) in formats that can be natively compiled in various language targets.
2012-10-27 17:20:34 +00:00
2017-12-14 05:08:07 +00:00
A [canonical list of TLDs in CSV format](/tlds.csv) was used to generate the native formats.
2017-12-04 21:56:31 +00:00
2017-12-14 06:05:44 +00:00
## Installation
The lists can be conveniently used in PHP or Node projects including this package.
### Node
* use npm to add the **tld-enum** package to your project
```sh
$ npm install tld-enum --save
```
### PHP
* use composer to add the **tld-enum** package to your project
```sh
2017-12-14 06:09:12 +00:00
$ ccomposer require katmore/tld-enum
2017-12-14 06:05:44 +00:00
```
2017-12-04 22:17:37 +00:00
## List Formats
2017-12-13 20:37:50 +00:00
* **PHP**: [TldEnum.php](/formats/php/TldEnum/TldEnum.php)
2017-12-04 22:40:06 +00:00
2017-12-14 05:26:09 +00:00
A PHP source file providing a class with a constant having an array value comprised of every IANA TLD.
2017-12-04 22:40:06 +00:00
2017-12-13 20:37:50 +00:00
* **JSON**: [tld-list.json](/formats/json/tld-list.json)
2017-12-04 22:40:06 +00:00
2017-12-14 05:26:09 +00:00
A JSON formatted array comprised of every IANA TLD.
2017-12-04 22:40:06 +00:00
2017-12-13 21:23:52 +00:00
* **JavaScript**: [tld-enum.js](/formats/js/tld-enum.js)
2017-12-04 22:40:06 +00:00
2017-12-14 05:26:09 +00:00
An export module with a constant having an array value comprised of every IANA TLD.
2017-12-14 06:05:44 +00:00
## Updating the TLD lists
* [bin/update-formats](/bin/update-formats)
```sh
$ bin/update-formats
```
This should be all you need to update all the list formats using the latest data from IANA.
It uses multiple "helper" scripts to generate the full set of native format lists.
The individual "helper" scripts do not need to be directly executed when [update-formats](/bin/update-formats)
runs successfully.
2017-12-04 21:56:31 +00:00
## Legal
2017-12-04 22:40:06 +00:00
The source code in this project is based on a fork of certain source code originally from the [incognico/list-of-top-level-domains](https://github.com/incognico/list-of-top-level-domains) project, as retrieved on 2017-12-04, which was published to the public domain.
2017-12-04 21:56:31 +00:00
### Copyright
2017-12-14 05:26:09 +00:00
TLD Enumerations - https://github.com/katmore/tld-enum
2017-12-04 21:56:31 +00:00
The following copyright notice applies to all resources in this project unless specifically noted otherwise:
Copyright (c) 2017 Doug Bird, All Rights Reserved.
2017-12-13 20:22:57 +00:00
### Public Domain Resources
The following resources of this project are hereby released into the public domain:
* [/tlds.csv](/tlds.csv)
2017-12-14 05:15:15 +00:00
* [/formats/js/tld-enum.js](/formats/js/tld-list.js)
* [/formats/json/tld-list.json](/formats/json/tld-list.json)
* [/formats/php/TldEnum/TldEnum.php](/formats/php/TldEnum/TldEnum.php)
2017-12-14 04:54:49 +00:00
* [/assets/tld-desc.csv](/assets/tld-desc.csv)
2017-12-04 21:56:31 +00:00
### License
All resources in the 'TLD Enumerations' project are copyrighted free software unless specifically noted otherwise.
2017-12-04 21:56:31 +00:00
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 [LICENSE](/LICENSE) and [GPLv3](/GPLv3).
2017-12-13 20:23:47 +00:00
These licensing conditions do not apply to any resources that have been released into the public domain; which are listed in the [**"Public Domain Resources"**](/README.md#public-domain-resources) section of the 'TLD Enumerations' project's [README](/README.md) document.