With php you can use the fopen
$arquivo = "bots.txt";
fopen($arquivo, "r+"); // abre o arquivo para leitura e escrita
$linhas = "";
while(!feof($arquivo)){
$linhas .= fgets($arquivo, 1024)."\n"; // adiciona linhas
}
With this you can implement an editor to delete or insert lines:
<textarea><?php echo $linhas; ?></textarea>
For writing you use fwrite
fopen($arquivo, "r+"); // abre o arquivo para leitura e escrita
fwrite($arquivo, $_POST['textarea']); // altera o arquivo com o valor
In String Mode you have the following options:
'r' Opens only for reading; puts the file pointer at the beginning
of the file.
'r +' Opens for reading and writing; places the file pointer on the
beginning of the file.
'w' Opens only for writing; puts the file pointer at the beginning
of the file and reduces the file length to zero. If the file
does not exist, try to create it.
'w +' Opens for reading and writing; places the file pointer on the
beginning of the file and reduces the file length to zero. If the
file does not exist, try to create it.
'a' Opens only for writing; puts the file pointer at the end
of the file. If the file does not exist, try to create it.
'a +' Opens for reading and writing; places the file pointer on the
end of the file. If the file does not exist, try to create it.
'x' Creates and opens the file for writing only; puts the pointer on the
beginning of the file. If the file already exists, the call to fopen ()
will fail, returning FALSE and generating an E_WARNING level error. If the
file does not exist, try to create it. This is equivalent to specifying
the O_EXCL | O_CREAT flags for the open (2) system call.
'x +' Creates and opens the file for reading and writing; put the pointer
at the beginning of the file. If the file already exists, the call to fopen ()
will fail, returning FALSE and generating an E_WARNING level error. If the
file does not exist, try to create it. This is equivalent to specifying
the O_EXCL | O_CREAT flags for the open (2) system call.