I have a log file assume it to be any text(txt) file.
I am reading it using php and performing functions.
The log file gets updated mostly every 10 seconds by a program as a normal log file does though the time interval is not fixed. I am ready to take some delay in showing the results.
One method is using cron jobs (which looks quite and odd to refresh the script every 10-20 seconds).
Assume the log file and the php file on the same server
I have my own dedicated server Ubuntu
Can anyone tell me a method through which i can read the file ?
Something like the php file gets executed whenever the file changes or do i have to use python/java or some other language for it ??
If the answer still sticks to cronjobs how do i add them in my Ubuntu server(i have php as a apache module) ?
Thanks
readfile()