[thelist] PHP help wanted & fonts tip

Jay Blanchard jay.blanchard at niicommunications.com
Mon Oct 28 07:33:03 CST 2002


[snip]
I am afraid to say that the example Jay just gave re connection time
calculations is not correct.

To correctly calculate download time:

1) Remember file size is in bytes, connection speed is in bits

2) 1 kilobit = 1000 bits
   1 kilobyte = 1024 bytes
   1 byte = 8 bits

So,

>If you want to code in PHP then you can get the file size and divide it by
>known connection speeds. So if you have a file that is 86Kb;

>28Kbps connection - 3.07 seconds
>33Kbps connection - 2.61 seconds

86 kilobyte file is the same as 88,064 bytes
then multiply by 8 to get bits, which is equal to 704,512 bits

28.8 Kbps connection = 28,800 bits per second

Divide 704,512 by 28,800 you get 24 seconds.... which is not quite the same
as 3 seconds as Jay pointed out earlier...

As Jay correctly points out, this is theoretical speed.
[/snip]

Thanks Alex, still sleeping, math suffering.

Also, as far as I know there is no way to "get" the connection speed of a
user, so you cannot do an accurate guess of download speed for a particular
file and a particular user. You have to use the list of popular connection
speeds (14.4, 28, etc.) and do the math for the ones you desire. I would
suggest that down load times for folks with "cable and above" connections
would be unimportant unless the files you are sending are rather monsterous.

Jay





More information about the thelist mailing list