say someone enters a URL like this:
http://i.imgur.com/a/b/c?query=value&query2=value
And I want to return: imgur.com
not i.imgur.com
This is code I have right now
$sourceUrl = parse_url($url);
$sourceUrl = $sourceUrl['host'];
But this returns i.imgur.com