With php you can use 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>
To write you use the 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 read-only; puts the file pointer at the beginning
of the archive.
'r+' Opens for reading and writing; puts the file pointer on
beginning of archive.
'w' Open only for writing; place the file pointer at the beginning
of the file and reduces the file length to zero. If the file
does not exist, tries to create it.
'w+' Opens for reading and writing; puts the file pointer on
file start and reduce the file length to zero. If the
file does not exist, tries to create it.
'to' Opens only for writing; puts the file pointer at the end
file. If the file does not exist, try to create it.
'to+' Opens for reading and writing; puts the file pointer on
end of file. If the file does not exist, try to create it.
'x' Create and open the file for writing only; put the pointer on
file start. 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, tries to create it. This is equivalent to specify
the flags O_EXCL|O_CREAT for the open system call(2).
'x+' Creates and opens the file for reading and writing; places 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, tries to create it. This is equivalent to specify
the flags O_EXCL|O_CREAT for the open system call(2).
Do you already have something ready? Some code?
– DiegoSantos