I am scraping wordpress blogs. This generates a list of URLS which are not the top domain e.g. http://www.someblog.com. they are posts e.g. http://www.somblog.com/somepost.php what is the best way to remove the /some post from the url so I am left with just the domain http://www.somedomain.com The reason is I can then run them through a pr checker.