I am working on PHP script which runs in background and reloads every 30-60 seconds and generates output which writes on first two lines of the file. For example let's say I have a file named file.txt
.
Output:
server1-online
server2-online
I have a script which completes in every 8 seconds and on my index page, I need to show last status which was written in file.txt
and override after every 8 seconds delay.