title: Read txt file each second from PHP page
body: <p>I have a webpage.....
  I need to read a file each second (only 50 lines): /var/log/message     (CENTOS 6.5).
  I tried with this but does not work</p>
  
  <pre><code>&lt;?PHP
  
    $file_handle = fopen("error.txt", "rb");
  
       while (!feof($file_handle) ) {
  
    $line_of_text = fgets($file_handle);
    $parts = explode('=', $line_of_text);
  
  print $parts[0] . "   &lt;BR&gt;";
  
  }
  
  fclose($file_handle);
  
  ?&gt;
  </code></pre>
  
  <p>Please help me</p>
  
  <p>Thanks</p>