I have a php script which runs a command that takes a good while to finish, so I have the command running via passthru($cmd); so I can see the output. This works great, with one problem...

 

The output comes pretty quickly and I have to keep scrolling down the page to see the output.

 

I want some way to either make the page automatically scroll or refresh the page constantly while the command runs in the background and only shows the latest line of output.

 

As the bottom of the page has not been reached yet, it seems javascript will not work for me, because I cannot put an id tag of the bottom of the page which has not loaded yet, so javascript doesn't know where to scroll to, unless I'm doing it wrong.

 

Any advice or help would be great!

--

 

 

 

Regards,

 

Nathan England

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

NME Computer Services http://www.nmecs.com

Nathan England (nathan@nmecs.com)

Systems Administration / Web Application Development

Information Security Consulting

(480) 559.9681