A library to get the tld list from the public suffix list and build the tld hierarchy


An implementation of the php-tld-interface library.

coverage build status

Last Updated Date : 2022-08-07


The installation of this library is made via composer. Download composer.phar from their website. Then add to your composer.json :

	"require": {
		"php-extended/php-tld-provider-mozilla": "^3"

Then run php composer.phar update to install this library. The autoloading of all classes of this library is made through composer's autoloader.

Basic Usage

You may use this library this way to build a hierarchy :

use PhpExtended\Tld\MozillaTopLevelDomainProvider;

$provider = new MozillaTopLevelDomainProvider();
$hierarchy = $provider->getHierarchy();
$hierarchy->isTld(''); // returns false


MIT (See license file).