A list of top level domains (TLDs) in CSV-format
Go to file
Doug Bird 94f1a07863
Update README.md
2017-12-13 22:05:44 -08:00
assets automated format generation 2017-12-13 20:49:59 -08:00
bin automated format generation 2017-12-13 20:49:59 -08:00
formats latest info from IANA 2017-12-13 20:51:14 -08:00
.gitignore automated format generation 2017-12-13 20:49:59 -08:00
GPLv3 project init 2017-12-04 13:56:31 -08:00
LICENSE project init 2017-12-04 13:56:31 -08:00
README.md Update README.md 2017-12-13 22:05:44 -08:00
composer.json npm package and path refactoring 2017-12-13 12:01:28 -08:00
package.json rename tld-enum 2017-12-13 21:26:09 -08:00
tlds-idn.txt Adding a list IDN TLDs 2012-10-30 20:56:17 +01:00
tlds.csv latest info from IANA 2017-12-13 20:51:14 -08:00

README.md

TLD Enumerations

Lists of every IANA TLD in formats that can be natively compiled in various language targets.

A canonical list of TLDs in CSV format was used to generate the native formats.

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
    $ npm install tld-enum --save
    

PHP

  • use composer to add the tld-enum package to your project
    $ composer require tld-enum
    

List Formats

  • PHP: TldEnum.php

    A PHP source file providing a class with a constant having an array value comprised of every IANA TLD.

  • JSON: tld-list.json

    A JSON formatted array comprised of every IANA TLD.

  • JavaScript: tld-enum.js

    An export module with a constant having an array value comprised of every IANA TLD.

Updating the TLD lists

  • bin/update-formats

    $ 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 runs successfully.

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.

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 Doug Bird, All Rights Reserved.

Public Domain Resources

The following resources of this project are hereby released into the public domain:

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 LICENSE and GPLv3.

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" section of the 'TLD Enumerations' project's README document.