pm_Checker:: domain Method

Checks whether the specified domain name is valid.

Syntax

public static function domain ($dom_name)

Parameters

dom_name

      A string value that specifies the domain name to check.

Returns

A boolean set to true if the domain name is well-formatted, false otherwise.

Remarks

This function is a particular case of pm_Checker::rfc_domain, except it imposes tighter restrictions on the length of the passed in domain name.

A valid domain name shouldn't be longer than 245 characters, shouldn't be 'localhost.rev' or ending with '.in-addr.arpa' (reverse resolution from an IP address to the fully qualified domain address). IP addresses are also disallowed.

A valid domain name specified in the dom_name parameter should be formatted as a series of labels glued with '.' (dot) characters, i.e. <label>[.<label>[…]], each label up to 63 characters long, beginning with a Latin letter and composed of Latin letters (A-Z, a-z), digits (0-9) and '-' (hyphen) characters. E.g. Plesk-8.main-support.support.com.