Detect the registered domain for a given domain name in C, Perl and PHP, based on Mozillas effective TLD listing