src/Request/URL.php
public static function getDomainFromURL($url)
	{
		$url = str_replace(self::getProtocolFromURL($url) . '://', '', $url);
		
		return explode('/', $url)[0];
	}
public static function getDomainFromURL($url)
	{
		$url = str_replace(self::getProtocolFromURL($url) . '://', '', $url);
		
		return explode('/', $url)[0];
	}
public static function getDomainFromURL ( $ url ) { $ url = str_replace ( self :: getProtocolFromURL ( $ url ) . '://' , '' , $ url ) ; return explode ( '/' , $ url ) [ 0 ] ; }
Extracts the domain from a URL

@param $url string The URL

@return string The domain (with port)
Extracts the domain from a URL