pm_Checker:: rfc_domain Method

Checks whether the specified domain name is valid according to RFC 1035.

Syntax

public static function rfc_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

A valid domain name shouldn't be longer than 255 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.