php-extended/php-tld-provider-mozilla

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

7.0.45 2024-12-22 02:15 UTC

This package is auto-updated.

Last update: 2024-12-22 01:15:12 UTC


README

An implementation of the php-tld-interface library.

coverage build status

Last Updated Date : 2024-12-22

Installation

The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.

  • Download composer.phar from their website.
  • Then run the following command to install this library as dependency :
  • php composer.phar php-extended/php-tld-provider-mozilla ^7

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('example.com'); // returns false

License

MIT (See license file).