php does have some new functions for this but i am not familiar with how they work yet.
This has been a long standing battle because everyones upload speed is different so the only way that i am aware of to get that speed is to place a file on the users computer during the process and upload it to see the speed. But that causes privacy issues because in order to do that legally you have to ask the user each time if they agree to that process.
So basically the way i understand it, its a best guess ballpark kind of thing. I know that youtube has a process after the original process has reached 100% and my feeling is that they use this extra time to finish the offset between userside and serverside.. but i could be wrong on that one.
I know there are probably new fresh techniques to come up with the answer but i am not aware of it yet, maybe someone out there can teach me..
This is why on my video plugin i allow the admn to decide the overall speed and i also have a default speed i use as a general global average. Sometimes the bar is half way when it completes, sometimes the bar is all the way and it just works out perfect, and sometimes the bar is at 100% and sits there for a half a minute till its done.
I know that SD was looking at doing a progress bar deal for uploads some time back as a plugin, so he must know the secret :)
But my best advice for now is to look at the php manual for the new functions, i hear they do great things.
be careful depending on $_FILES['size'] or ['type']. I know that type has a bad reputation for NOT being dependable but and im not sure about size, if its that bad or not...
i assume your going to use both php, js, and ajax so you can do it on the fly?
I think your still going to run into some issues and your gonna need some kind of offset process because even if you monitor the stream as a middleman for example, the time it takes to get to the server and actually be resourced i dont think can be measured unless one of those new php functions does that.