".$domain." has been added to
".$file."
"); fclose($handle); } }elseif($action=="remove"){ if($domain!=""){ $content = file($file); $newcontent =""; foreach($content as $dom){ if(trim($domain)!=trim($dom)){ $newcontent .= $dom; } } $fileHandler = fopen ($file, "w"); fwrite ($fileHandler, $newcontent); fclose ($fileHandler); } } ?>