Running parse_url()
on :
This kind of URLs : http://mondomom.com
extracts successfully mondomom.com
and returns it as host.
This kind of URLs : http://www.mondomom.com/?sdfdsfsd=dsdfsdf
extracts successfully mondomom.com
and returns it as host.
But on this kind of URLs : http://www.mondomom.com/sdasdasd/sdad
the parse_url()
function can not find the domain. It seems that it is only designed to work with URL that have query strings in them
Is there a way to extract the correct domain from the latter ?