well, something like...
(mind: it's a quicky!)
$fp = fopen("file.txt", "r");
$content = fread($fp);
fclose($fp);
// something to find the line to delete
while ($current_line = fgets($content, 1024)) {
if $current_line ... {
// when it doens't have to be deleted
$new_content .= $current_line
}
$fp = fopen("file.txt", "w");
fwrite($fp, $new_content);
fclose($fp);