Login   Register  
PHP Classes
elePHPant
Icontem

File: readme.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Artur Barseghyan  >  PHP TLD Domain Name  >  readme.txt  >  Download  
File: readme.txt
Role: Documentation
Content type: text/plain
Description: Readme
Class: PHP TLD Domain Name
Determine the Top Level Domain from a given URL
Author: By
Last change: License update
Date: 1 year ago
Size: 640 bytes
 

Contents

Class file image Download
AUTHOR
    Artur Barseghyan (artur.barseghyan@gmail.com)

LICENSE
    MPL 1.1/GPL 2.0/LGPL 2.1

DESCRIPTION
    Extracts the top level domain (TLD) from a URL given. List of TLD names is taken from
    http://mxr.mozilla.org/mozilla/source/netwerk/dns/src/effective_tld_names.dat?raw=1

USAGE EXAMPLE
    To get the top level domain name from the URL given:
        require 'tld/utils.php';
        echo Tld::getTld("http://www.google.co.uk")

    To update/sync the tld names with the most recent version run the following from your terminal:
        php -f tld/update.php

    To run tests:
        php -f tld/tests.php