Strip domain name from full domain
<p>I'm looking for a quick way of getting parts of a domain name:</p>

<p><strong>Example:</strong> <a href="http://www.mydomain.com/something/hello.html" rel="nofollow">http://www.mydomain.com/something/hello.html</a></p>

<p>I need to get the "mydomain.com" part and nothing else.</p>

<p>But, the url may change sometime, for example:</p>

<p><a href="http://mydomain.com/something/hello.html" rel="nofollow">http://mydomain.com/something/hello.html</a></p>

<p><a href="http://www.mydomain.com/hello.html" rel="nofollow">http://www.mydomain.com/hello.html</a></p>

<p><a href="http://mydomain.com" rel="nofollow">http://mydomain.com</a></p>

<p>Any help would be great,</p>

<p>Thanks!</p>
