Don't add a sleep() inside the loop. If you do you will severely slow down the upload.
In my tests, each time through the loop it send about 2.5K, looping about 220 times per second. (Which is very little.)
You won't necessarily get the same numbers as me per loop, but clearly PHP does it's own management of the loop so that you don't consume all the CPU on the server.