public static function getDomain($uri)
    {
        $returnValue = parse_url($uri, PHP_URL_HOST);
        if (empty($returnValue)) {
            return null;
        }

        return $returnValue;
    }
public static function getDomain($uri)
    {
        $returnValue = parse_url($uri, PHP_URL_HOST);
        if (empty($returnValue)) {
            return null;
        }

        return $returnValue;
    }
public static function getDomain ( $ uri ) { $ returnValue = parse_url ( $ uri , PHP_URL_HOST ) ; if ( empty ( $ returnValue ) ) { return null ; } return $ returnValue ; }
Returns the domain extracted from a given URI. If the domain cannot be
null is returned.

@access public
@author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>
@param  string uri A Uniform Resource Identifier (URI).
@return string|null
Returns the domain extracted from a given URI . If the domain cannot be null is returned .