-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2820e4c
Showing
16 changed files
with
9,482 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) Saša Stamenković <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is furnished | ||
to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
TLD List | ||
======== | ||
|
||
Formats Available | ||
----------------- | ||
|
||
- Text | ||
- JSON | ||
- YAML | ||
- XML | ||
- HTML | ||
- CSV | ||
- SQL | ||
* MySQL | ||
* PostgreSQL | ||
* SQLite | ||
- PHP | ||
|
||
Build | ||
----- | ||
|
||
Currency list is available out of the box, but if you want to submit patches, add new formats, | ||
update data source or contribute in any other way, you will probably want to rebuild the list: | ||
|
||
```bash | ||
$ composer install | ||
$ ./bin/build | ||
``` | ||
|
||
Other Interesting Lists | ||
----------------------- | ||
|
||
* [Country List](https://github.com/umpirsky/country-list) | ||
* [Currency List](https://github.com/umpirsky/currency-list) | ||
* [Language List](https://github.com/umpirsky/language-list) | ||
* [Locale List](https://github.com/umpirsky/locale-list) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
include __DIR__ . '/../vendor/autoload.php'; | ||
|
||
class Tld extends Umpirsky\ListGenerator\Importer\Importer | ||
{ | ||
public function getLanguages() | ||
{ | ||
return ['en']; | ||
} | ||
|
||
public function getData($language) | ||
{ | ||
$data = explode( | ||
PHP_EOL, | ||
file_get_contents('https://data.iana.org/TLD/tlds-alpha-by-domain.txt') | ||
); | ||
array_shift($data); | ||
array_pop($data); | ||
|
||
$tlds = []; | ||
foreach ($data as $tld) { | ||
$tld = strtolower($tld); | ||
$tlds[$tld] = idn_to_utf8($tld); | ||
} | ||
|
||
return $tlds; | ||
} | ||
} | ||
|
||
(new Umpirsky\ListGenerator\Builder\Builder( | ||
new Tld(), | ||
__DIR__.'/../data' | ||
))->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "umpirsky/tld-list", | ||
"type": "library", | ||
"description": "List of all top-level domains in all data formats.", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Saša Stamenković", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.4" | ||
}, | ||
"require-dev": { | ||
"umpirsky/list-generator": "^1.1" | ||
} | ||
} |
Oops, something went wrong.