Yngvarr

Generation

generate functionSat, 15 Apr 2023

get domain with url

function get_domain($url) { $pieces = parse_url($url); return isset($pieces['host']) ? $pieces['host'] : ''; } get_domain("https://www.google.com");

Questions about programming?Chat with your personal AI assistant