Hello,
Can someone please help me:
I have a Guestbook with the messages in a textfile. Now the file becomes to large and that is making my Guestbook slow.
Therefor I would like to split my textfile and put it in several other files. Every message in my file ends with a word named "splitter".
My question is now:
How can I make a script in php that searches for the 10nd word "Splitter" and puts the hole string till that 10nd found word into a new file?
I mean->
the first file</html>splitter
bla bla </html>splitter
dedeke </html>splitter
lkjkjloj</html>splitter
opipoipo</html>splitter
yuittfuyf</html>splitter
uiyiuyiu</html>splitter
iouoiuiou</html>splitter
ipoipoipoi</html>splitter
qweuwh</html>splitter
This is the second file</html>splitter
dqiojdoiwqj</html>splitter
So my file will be:
File1.txt
the first file</html>splitter
bla bla </html>splitter
dedeke </html>splitter
lkjkjloj</html>splitter
opipoipo</html>splitter
yuittfuyf</html>splitter
uiyiuyiu</html>splitter
iouoiuiou</html>splitter
ipoipoipoi</html>splitter
qweuwh</html>splitter
File2.txt
This is the second file</html>splitter
dqiojdoiwqj</html>splitter
😕
Regards.