The short answer is no.
The long answer is nooooooooooooooooooooooooooooooooo.
:p
Theres no interface between PHP and the browser like that, so it can't be done in PHP. I don't believe JavaScript has any functionality to work out how far along a request is either.
You might be able to work in out using Flash.. but thats Flash, and a plugin, and therefore nasty.