Hello everyone, there was such a question, there is a script that puts the data in the file after each image to it, the data mainly consist of a form. The question is whether it is possible, somehow besides str_replace remove a form from the contents of a file, if this form is not one but there are several more.
<form method="POST" action="creator.php"> <div class="inpt"> Tour Text </div> <div class="inp"> <input type="text" name="content36" size="40" value="<?php $cfile = 'content/content36.txt';$cont = file_get_contents($cfile); echo $cont;?>" style="text-align:center;"> </div> <div class="inpt"> Tour Text </div> <div class="inp"> <textarea name="content37" rows="30" cols="100" style="resize:none;"> <?php $cfile='content/content37.txt' ;$cont=f ile_get_contents($cfile); echo $cont; ?> </textarea> </div> <div class="inp"> <input type="submit" value="Change Content"> </div> It is necessary to remove such forms without replacing others, is there a way other than str_replace ?