What is the best way to just get the root domain of a url. For example the url could be something like http://www.somedomain.com/somefolder/somepage.html
How can I just get the http://www.somedomain.com
?
$urlarray = parse_url($url); $qualdomain = $urlarray['scheme'].$urlarray['host'];
🙂