Jump to content


Photo

Meassure Download speed


  • This topic is locked This topic is locked
4 replies to this topic

#1 thor erik

thor erik
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 02 August 2006 - 02:25 PM

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?

#2 Ifa

Ifa
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts
  • LocationRauma, Finland

Posted 02 August 2006 - 02:33 PM

You mean something like
$downloadtime = filesize("filename.zip") / download speed?
I'm just a guy who likes to code for fun...

#3 thor erik

thor erik
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 02 August 2006 - 02:38 PM

well my scrip is automaticly calculating the ammoun of time.

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

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.


#4 PHPSpirit

PHPSpirit
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 02 August 2006 - 04:59 PM

In case that bandwith is entered on manual way, you can use this:

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

echo $timeseconds;


#5 thor erik

thor erik
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 02 August 2006 - 05:02 PM

the thing is that i want it to automaticly to meassure your bandwidth.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users