Ive asked this question before, but I discovered a problem with the top answer. Its been suggested I use parse_url() to get the domain part of any URL. The problem is, the function wont work if the url doesn't start with http://
Are there any alternatives to using the parse_url function? The only I can see, is adding http:// to the url if its not there before feeding it into the function.