Well it's best to think about the properties you need to relate the progress,
All you need to have is a current position and an end position, the calculation for percentage would simply be:
CODE
(currentPosition / endPosition) * 100
Then you would round that off, the problem is however retrieving these values, the end position you could retrieve from the 'Content-Length' header yet the current you would have to log the current position in the raw data.
Then in javascript you could calculate the percentage, then set the width property on an element to reflect that.
If it's not a multipart form you can just use:
php://input
That will retrieve the raw data, multipart is a whole different ball park. The other option is to just have a simple bar that whizzes backwards and forwards and on completion sets some file (which is polled) to a new value and then that signifies that the message has been sent.