Page 1 of 1
Download Speeeeeeeds
Posted: Sat Jan 17, 2004 9:46 am
by Gen-ik
Not sure if this should be here or in client-side so (admins) move it if you need to
I'm after some sort of download-speed information so that I can let a user know how long (approx) a download might take with a certain connection.
2.00 megs at 56Kbps would be => ?
7.65 megs at 512Kbps would be => ?
It doesn't have to be very accurate, and I was wondering if there was a function() class() or just some information about it that I might be able to take a look at. Another simple way of doing this might be to find out how long on average a 1 meg file takes on certain connections, and then I could do all of the working out from there.
Thanks.
PS. KBPS (kilobytes per second) as we all know tends to lie to us... so just saying that 10K would take 10 seconds on a 1Kbps connection isn't what I'm after

Posted: Sat Jan 17, 2004 10:32 am
by Straterra
Hm....couldn't you ping the user and get a small idea of their speed, and take that data and perhaps display information?
Posted: Sat Jan 17, 2004 10:36 am
by Gen-ik
Straterra wrote:Hm....couldn't you ping the user and get a small idea of their speed, and take that data and perhaps display information?
If you have an example that would be better as I haven't even looked at PHP pinging before
Since I posted this topic though I have (from various sources) worked out a rough guide for download times of a 1meg file.
Code: Select all
Connection Filesize Time
56K Modem 1.00MB (155.108 seconds)
128K ISDN 1.00MB (064.086 seconds)
256K Cable 1.00MB (031.888 seconds)
512K DSL/Cable 1.00MB (016.408 seconds)
1MB DSL/Cable 1.00MB (008.049 seconds)
T-1 1.00MB (005.263 seconds)
2MB DSL/Cable 1.00MB (004.334 seconds)
If there is a more accurate way of doing it though them I all ears.
Posted: Sat Jan 17, 2004 10:46 am
by Straterra
I haven't pinged before either, but if you are on a Linux system, can't you uses PHP to exec the ping command?
Posted: Sat Jan 17, 2004 5:14 pm
by dull1554
if your users have to register before they can download, then you should ask them what their conection speed is, then when they go to download a file, reference a database for aprox. DL time, and multiply it by the size of the file (in mb), as far as i can tell by looking at the php manual, there is no pre made php function to ping a person's BOX
Posted: Sat Jan 17, 2004 5:33 pm
by Gen-ik
dull1554 wrote:if your users have to register before they can download, then you should ask them what their conection speed is, then when they go to download a file, reference a database for aprox. DL time, and multiply it by the size of the file (in mb), as far as i can tell by looking at the php manual, there is no pre made php function to ping a person's BOX
Yeah I've got things set-up to do just that at the moment... it was just some download speeds (on various connections) that I was after and I think I've sorted that too (see above).
I'm using it just to give the user an idea of how long it will take to download their selection of MP3 files on their (selected) connection speed.
Thanks anyway mate

Posted: Sat Jan 17, 2004 5:37 pm
by Straterra
If you haven't already, search this forum for pinging people. I could have sworn I remember reading something about someone finding a way to ping though PHP on a *nix system...
Posted: Sat Jan 17, 2004 6:13 pm
by dull1554
w/e
Posted: Sun Jan 18, 2004 5:51 am
by basdog22
i think you can also find it like that:
56k ---> 56000/8 == 7kb /sec
128k ---> 13kb/sec
etc...
then:
1mb /7kb ---> 142 seconds on 56k
Posted: Sun Jan 18, 2004 7:06 am
by fastfingertips
basdoq a little mathematic please
1Mb= 1024/7=146 seconds

.
Anyway your speed is the ideal one. If you need to display a real time is possible (using pings) but i think is very hard (ps use flash script for that

)
Posted: Sun Jan 18, 2004 2:15 pm
by basdog22