<?php
$lines = yourtextfile.txt;
foreach($lines as $line)
{
$new_url=parse_url($line,PHP_URL_HOST);
}
array_unique($new_url);
echo $new_url;
?>
Warning: Invalid argument supplied for foreach() in /home/.../urls.php on line 4
Warning: array_unique() [function.array-unique]: The argument should be an array in /home/.../urls.php on line 8
You could do this using excel, just open the text file from excel using / as the delimiter.