league / uri-hostname-parser
ICANN base hostname parsing implemented in PHP.
Requires
- php: >=7.0
- ext-intl: *
- psr/simple-cache: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.7
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^6.3
Suggests
- ext-curl: To use the bundle cURL HTTP client
- psr/simple-cache-implementation: To enable using other cache providers
README
This package is EOL since 2018-02-16
This repository was a temporary workaround for
- PHP Domain Parser v3.0
- used by League URI v5.
You should instead use:
This package contains a lightweight domain parser using the Public Suffix List (PSL) ICANN section based on the excellent work by Jeremy Kendall.
WARNING: Some people use the PSL to determine what is a valid domain name and what isn't. This is dangerous, particularly in these days where new gTLDs are arriving at a rapid pace, if your software does not regularly receive PSL updates, because it will erroneously think new gTLDs are not valid. The DNS is the proper source for this in normal condition. If you must use it for this purpose, please do not bake static copies of the PSL into your software with no update mechanism.
System Requirements
You need:
- PHP >= 7.0 but the latest stable version of PHP is recommended
- the
mbstring
extension - the
intl
extension - the
curl
extension
Dependencies
Installation
$ composer require league/uri-hostname-parser
Documentation
Full documentation can be found at uri.thephpleague.com.
Contributing
Contributions are welcome and will be fully credited. Please see CONTRIBUTING and CONDUCT for details.
Testing
Uri Hostname Parser
has a PHPUnit test suite and a coding style compliance test suite using PHP CS Fixer. To run the tests, run the following command from the project folder.
$ composer test
Security
If you discover any security related issues, please email nyamsprod@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Attribution
This work is based on a Fork of PHP Domain Parser