title: How to plot a realtime graph (histogram) using data obtained in a text file
body: <p>I have a continuously generated data (text file) generated by a program on the server. I want to plot the data as a real-time graph just like <a href="http://your.gridspy.co.nz/powertech/" rel="nofollow noreferrer">powergrid</a> does. This was my approach: </p>
  
  <p>As the data is generated continuously on the server in a text file, I wrote a PHP script which reads that file(<code>get_file_contents</code>), outputs the data points and plot the graph using <a href="http://omnipotent.net/jquery.sparkline" rel="nofollow noreferrer">sparkline</a> jQuery plugin.  But the problem is that it reads the file <strong>all at once</strong>. Moreover, the text file keeps on growing. Can anyone suggest me a better approach?</p>