Looks good. Though I haven't' tested it on my server personally I can see some possible dilemmas arising from the following:
$domList = str_replace("/"," ",$domList);
$domList = str_replace("www.","",$domList);
From what I see str_replace("/" would separate the opening slash isolating the...