PHP log parser(reading text files)
<p>I have a log file assume it to be any text(txt) file.</p>

<p>I am reading it using php and performing functions.</p>

<p>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.</p>

<p>One method is using cron jobs (which looks quite and odd to refresh the script every 10-20 seconds).</p>

<p>Assume the log file and the php file on the same server</p>

<p>I have my own dedicated server Ubuntu</p>

<p>Can anyone tell me a method through which i can read the file ?</p>

<p>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 ??</p>

<p>If the answer still sticks to cronjobs how do i add them in my Ubuntu server(i have php as a apache module) ?</p>

<p>Thanks</p>
