Skip to content

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

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages