Checking for a valid domainname

Very quick function to test a domain name is valid:     function validDomain($domain)     {         // Test domain is actually valid         if (preg_match(‘/^[a-z]+([a-z0-9-]*[a-z0-9]+)?(.([a-z]+([a-z0-9-]*[a-z0-9]+)?)+)*$/i’, $domain))         {       ...