Name | Modified | Size | Downloads / Week |
---|---|---|---|
idn_validator.php | 2011-04-04 | 4.7 kB | |
README.txt | 2011-04-04 | 2.7 kB | |
idna_convert.class.php | 2011-04-04 | 115.2 kB | |
Totals: 3 Items | 122.7 kB | 0 |
This class is a class to validate various domain names including IDN (international domain names) Notes: 1. I used idna_convert.class.php to convert from idna punnycode domain names to ascii domain names Reference: http://www.phpclasses.org/package/1509-PHP-Convert-from-and-to-IDNA-Punycode-domain-names.html IDNA stands for Internationalized Domain Names for Applications. It is a standard described in RFC 3490, RFC 3491 and RFC 3492. It is used to allow language specific characters in domain names, like the umlauts in German, accents in latin languages like French, or even chinese characters. This class allows you to convert domain names between the encoded Punycode notation and the decoded 8bit (UTF-8) notation. It simplifies the use of domain names defined with IDNA in applications or scripts. 2. All the domain naming rules were taken from Reference: http://en.wikipedia.org/wiki/Domain_Name_System - The right-most label conveys the top-level domain; for example, the domain name www.example.com belongs to the top-level domain com. - The hierarchy of domains descends from right to left; each label to the left specifies a subdivision, or subdomain of the domain to the right. For example: the label example specifies a subdomain of the com domain, and www is a sub domain of example.com. This tree of subdivisions may have up to 127 levels. - Each label may contain up to 63 characters. The full domain name may not exceed a total length of 253 characters in its external dotted-label specification. In the internal binary representation of the DNS the maximum length requires 255 octets of storage. In practice, some domain registries may have shorter limits.[citation needed] - DNS names may technically consist of any character representable in an octet. However, the allowed formulation of domain names in the DNS root zone, and most other sub domains, uses a preferred format and character set. The characters allowed in a label are a subset of the ASCII character set, and includes the characters a through z, A through Z, digits 0 through 9, and the hyphen. This rule is known as the LDH rule (letters, digits, hyphen). - - - -- Domain names are interpreted in case-independent manner. Labels may not start or end with a hyphen. - A hostname is a domain name that has at least one IP address associated. For example, the domain names www.example.com and example.com are also hostnames, whereas the com domain is not. 3. All the valid TLD's were taken from Reference 1: http://data.iana.org/TLD/tlds-alpha-by-domain.txt Reference 2: http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains If you have any question feel free to email me at alexander.luksidadi@gmail.com