Jump to content

Archived

This topic is now archived and is closed to further replies.

thor erik

Meassure Download speed

Recommended Posts

Well i'm working on a script that makes an approximation of the time it will take to download a file.

but i need some sort of a measurement. i've tried varius ways but atm it returns with faulty speeds :/

can any one help me?

Share this post


Link to post
Share on other sites
You mean something like
$downloadtime = filesize("filename.zip") / download speed?

Share this post


Link to post
Share on other sites
well my scrip is automaticly calculating the ammoun of time.

but instead of
[code]$values = array("DSL(high speed)"=>2048,
    "DSL(medium speed)"=>1024,
"DSL(low speed)"=>768,
                    "ISDN"=>128,
                    "Modem"=>56.6
                      );[/code]

i want one value witch is the persions band width

i got an idea of how it can be done but i dunno if it will work nor how to do it.

Share this post


Link to post
Share on other sites
In case that bandwith is entered on manual way, you can use this:

[code]
$timeseconds = (filesize("filename.zip")*8)/$bandwith; // bandwith always in bits

echo $timeseconds;
[/code]

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.