Page 1 of 1

Monitoring progress of processing on server from client

Posted: Fri Aug 25, 2006 10:59 am
by mjseaden
Hi,

I have a PHP script that runs a binary executable on the server, in response to selections made on an HTML form. The executable can take anything from 20 minutes to 2 hours to complete execution depending upon the commandline parameters it is passed. During processing, the binary executable generates an ASCII data table.

The PHP script then reads this ASCII data table, and generates an XML format from it.

The server blocks when execution is taking place. Whilst this blocking call to exec() is taking place on the server side, would it be possible to use client-side code to check on the size of the ASCII table it is generating on the server?

Many thanks

ms

Posted: Fri Aug 25, 2006 12:55 pm
by Christopher
If you form submission forks the process, and you know the name of the file being generated (either a fixed name or saved in the session) then you could poll to get the size of the file.