Skip to content

Simple PHP implementation for retrieving the fully qualified hostname.

Notifications You must be signed in to change notification settings

vis4/effective-domain-name

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple PHP implementation for retrieving the effective domain name. The effective domain name is the domain that includes exactly one level under the effective TLD.

> include('EffectiveDomainName.php');

> print EffectiveDomainName::get('mobile.nytimes.com') . "\n";
nytimes.com

> print EffectiveDomainName::get('flightjs.github.io') . "\n";
flightjs.github.io

> print EffectiveDomainName::get('www.google.com.br') . "\n";
google.com.br

The algorithm uses the database of public suffixes.

To update this database, just run make.

About

Simple PHP implementation for retrieving the fully qualified hostname.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages