Url splitting in php
<p>I have an url like this:</p>

<blockquote>
  <p><a href="http://www.w3schools.com/PHP/func_string_str_split.asp" rel="nofollow">http://www.w3schools.com/PHP/func_string_str_split.asp</a></p>
</blockquote>

<p>I want to split that url to get the host part only. For that I am using    </p>

<pre><code>parse_url($url,PHP_URL_HOST);
</code></pre>

<p>it returns www.w3schools.com.
I want to get only 'w3schools.com'.
is there any function for that or do i have to do it manually?</p>
