title: How to display a loading image gif or message while PHP is executing a batch file?
body: <p>I've been searching on the net for the answer, but couldn't find.</p>
  
  <p>How could I show some loading messsage or gif while the long executing script is running. I tested a number of different way like javascript, because my script is trying to use PLINK.exe to tail a file, which take about 30s to return the value. because it's one line code, I can't use flush(), is there any other way I cam make this happen?</p>
  
  <pre><code>&lt;?php
  $runCommand  = "C:\wamp\www\TS\batch\plink.exe Sever -l User \"ssh User@Server 'tail -600 /serverlog/test.log'\" ";
  $results=system($runCommand);
  //exec($runCommand, $results); 
  echo $results;
  ?&gt;
  </code></pre>