What is the most effective way of stripping a URL such as: http://www.eaguingamp.co.uk/2010/02/01/l2-vannes-2-2-eag/ down to just: eaguingamp.co.uk ?? Suggestions please.
$host = parse_url('http://www.eaguingamp.co.uk/2010/0..', PHP_URL_HOST); $host = preg_replace('~^www\.~i', '', $host);