I want to read everything from a textfile and echo it. But there might be more lines written to the text-file while I’m reading so I don’t want the script to exit when it has reached the end of the file, instead I wan’t it to wait forever for more lines. Is this possible in php?
Share
I solved it.
The trick was to use fopen and when eof is reached move the cursor to the previous position and continue reading from there.
Still consumes pretty much cpu though, don’t know how to solve that.