I don't believe that there is a way to tell without just sending them several files and checking how long it takes to download. You would probably have to make it in JS rather than PHP, though... Also, you should send several files, since the first one or two would be simply finding the shortest path from the two computers. After that you can send one more file to find the real rate of download.