Login   Register  
PHP Classes

PHP TLD Domain Name: Determine the Top Level Domain from a given URL

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Artur Barseghyan
Name: Artur Barseghyan <e-mail contact>
Packages: 4 Browse all classes by Artur Barseghyan Browse all classes by
Country: The Netherlands The Netherlands - PHP jobs in The Netherlands
Age: 34
All time rank: 192460 in The Netherlands The Netherlands
Week rank: 2051 Down63 in The Netherlands The Netherlands Down
Innovation award
Innovation award
Nominee: 2x

  Detailed description   Download Download .zip .tar.gz  
This class can determine the Top Level Domain from a given URL.

It can parse a given URL to extract the respective domain name.

The class can lookup a domain definition file retrieve from the Mozilla site to determine the actual part of the URL domain that is the top level domain.

It can also retrieve an updated version of the the top level domain definition file from the Mozilla file, so the TLD definition is determined more accurately.

  Classes of Artur Barseghyan  >  PHP TLD Domain Name  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP TLD Domain Name
Base name: tld
Description: Determine the Top Level Domain from a given URL
Version: 0.1
PHP version: 5.3
Licenses: GNU General Public License (GPL)
GNU Lesser General Public License (LGPL)
All time users: 280 users
All time rank: 6551
Week users: 0 users
Week rank: 1808 Equal
  Groups   Rate classes User ratings   Applications   Files Files  

Group folder image Networking Networking protocols, clients and servers View top rated classes
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes

  Innovation Award  
PHP Programming Innovation award nominee
May 2013
Number 7
The top level domain is the part of a domain name that defines the end of a domain.

In some cases it is easy to determine the top level domain because it is the name after the last point in the domain name. In many other cases it is no so easy because it is not after the last point and there is no rule to determine it.

This class can determine what is the top level domain of most known domain names using a Mozilla domain file.

Manuel Lemos

  User ratings  
Not yet rated by the users

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Files folder imageres (1 file)
Plain text file exceptions.php Class Exceptions
Accessible without login Plain text file readme.txt Doc. Readme
Accessible without login Plain text file tests.php Example Test/example
Accessible without login Plain text file update.php Appl. Update script to be used from command line
Plain text file utils.php Class Main file

  Files  /  Files folder image res  
File Role Description
  Accessible without login Plain text file effective_tld_names.dat.txt Data Test/example

Download Download all files: tld.tar.gz tld.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.