generate functionWed, 21 Dec 2022

remove domain from url dynamically

$url = 'http://blog.mattheworiordan.com/post/13174566389/url-regular-expression-for-links-with-or-without'; $matches = parse_url($url); $host = $matches['host']; echo $host;

Questions about programming?Chat with your personal AI assistant