Posts tagged ‘registered domain’

Detecting subdomains & effective TLD’s using publicsuffix.org

by on March 17, 2011


How do you detect if a domain contains a subdomain and then return that subdomain? At first it seems like it should be a simple problem. Just write a regexp that looks for the first period and return everything up to that point, ...