classes/Port43.php
// extract only the root domain even if valid sub-domain is supplied
extract only the root domain even if valid sub-domain is supplied
extract only the root domain even if valid sub - domain is supplied
function parse_url_domain($url)
    {
        $raw_url = parse_url($url);
        preg_match("/\.([^\/]+)/", $raw_url['host'], $domain_only);
        return $domain_only[1];
    }
function parse_url_domain ( $ url ) { $ raw_url = parse_url ( $ url ) ; preg_match ( " /\.([^\/]+)/ " , $ raw_url [ 'host' ] , $ domain_only ) ; return $ domain_only [ 1 ] ; }
extract only the root domain even if valid sub-domain is supplied
extract only the root domain even if valid sub - domain is supplied