thor erik Posted August 2, 2006 Share Posted August 2, 2006 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? Link to comment Share on other sites More sharing options...
Ifa Posted August 2, 2006 Share Posted August 2, 2006 You mean something like$downloadtime = filesize("filename.zip") / download speed? Link to comment Share on other sites More sharing options...
thor erik Posted August 2, 2006 Author Share Posted August 2, 2006 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 widthi got an idea of how it can be done but i dunno if it will work nor how to do it. Link to comment Share on other sites More sharing options...
PHPSpirit Posted August 2, 2006 Share Posted August 2, 2006 In case that bandwith is entered on manual way, you can use this:[code]$timeseconds = (filesize("filename.zip")*8)/$bandwith; // bandwith always in bitsecho $timeseconds;[/code] Link to comment Share on other sites More sharing options...
thor erik Posted August 2, 2006 Author Share Posted August 2, 2006 the thing is that i want it to automaticly to meassure your bandwidth. Link to comment Share on other sites More sharing options...
Recommended Posts