libtld is a library used to extract the TLD from a URI and to check email validity. This allows you to extract the exact domain name, sub-domains, and all the TLD (top level, second level, third level, etc.). The problem with TLDs is that you cannot know where the domain starts. Some domains can use one top-level domain, others use two, etc. However, it may be useful to know where the domain is to have the exact list of sub-domains. For example, if you want to force www. at the start of the domain name if no other sub-domains are specified, then you need to know exactly how many TLD are defined in a URI. The libtld offers one main function: tld(), which gives you a way to extract the TLD from any URI. The result is the offset where the TLD starts. This gives you enough information to extract everything else you need. For emails, the library is capable of parsing a string that represents a list of email addresses to be verified. The verification includes a check of the domain name and its TLD.
|Tags||url C Library tld developement Email C++ Library|
|Operating Systems||Linux (32 and 64 bit) Mac OS X Win32/64|
|Implementation||C C++ Qt 4 PHP|
Release Notes: This release mainly streamlines the license information of the module, adding a Debian compatible copyright file to the debian directory and /usr/share/doc/libtld on install. It also includes a new set of cmake files; although at this point they're still shipped as part of this project, at some point these cmake scripts will become a separate project.
Release Notes: This is a patch with the few new TLDs added in the last few months.
Release Notes: This version adds a strong email check in C, C++, and PHP. It also strengthen the documentation and restructures the project environment with 100% coverage by the unit tests.
Release Notes: This release adds a C++ class to easily handle URIs in C++, adds a PHP extension so [check_]tld() can be used in PHP, adds a static version of the library, updates the TLDs as of Feb 2013, and fixes the TLD exceptions, which now return a valid answer.
Release Notes: Support for exceptions such as nic.uk. The tests have been update accordingly. A test for the XML file to make sure it respects the DTD has been added. This release fixes offsets in the data table, unsigned short and -1; it uses USHRT_MAX now. The .us entries are complete.