Update README.md
This commit is contained in:
parent
a1f82ba3d6
commit
af37890a48
|
@ -8,7 +8,7 @@ A [canonical list of TLDs in CSV format](/tlds.csv) was used to generate the nat
|
||||||
The lists can be conveniently used in PHP or Node projects including this package.
|
The lists can be conveniently used in PHP or Node projects including this package.
|
||||||
|
|
||||||
### Node
|
### Node
|
||||||
* use npm to add the `tld-enum` package to your project as needed
|
* use npm to add the `tld-enum` package to your project
|
||||||
```sh
|
```sh
|
||||||
$ npm install tld-enum --save
|
$ npm install tld-enum --save
|
||||||
```
|
```
|
||||||
|
@ -61,13 +61,18 @@ The lists can be conveniently used in PHP or Node projects including this packag
|
||||||
```
|
```
|
||||||
|
|
||||||
### PHP
|
### PHP
|
||||||
* use composer to add the `katmore/tld-enum` package to your project as needed
|
* use composer to add the `katmore/tld-enum` package to your project
|
||||||
```sh
|
```sh
|
||||||
$ composer require katmore/tld-enum
|
$ composer require katmore/tld-enum
|
||||||
```
|
```
|
||||||
|
|
||||||
* access the list by using the `\TldEnum\TldEnum::TLD_ENUM` class constant array
|
* access the list by using the `\TldEnum\TldEnum::TLD_ENUM` class constant array
|
||||||
|
|
||||||
|
```php
|
||||||
|
require_once __DIR__ . '/vendor/autoload.php';
|
||||||
|
\TldEnum\TldEnum::TLD_ENUM; //an array with every IANA TLD
|
||||||
|
```
|
||||||
|
|
||||||
The following example...
|
The following example...
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue