Monitoring progress of processing on server from client

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mjseaden
Forum Contributor
Posts: 458
Joined: Wed Mar 17, 2004 5:49 am

Monitoring progress of processing on server from client

Post 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
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post 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.
(#10850)
Post Reply