PHP Class to check if given name valid domain name or not