View Full Version : ASP Bandwidth Test
Leeus
12-30-2002, 04:16 PM
Can't think of a way of carrying this out, some sites use a large image to download and I don't know how they do the calculation. This is an interesting one for you all!
Roelf
12-31-2002, 08:09 AM
perhaps this thread is usefull: http://www.codingforums.com/showthread.php?s=&threadid=8509
Leeus
12-31-2002, 08:46 AM
That kinda helped but what I wanted was to display the actual speed, I read in that thread it can be done with a file download??
Roelf
12-31-2002, 09:26 AM
thats what that code does, downloads a file, calculates the neccesary time, divide it, then based upon the speed, it shows a page for slow or fast connections
Leeus
12-31-2002, 09:37 AM
Can it output exact kb/s?
Roelf
12-31-2002, 09:44 AM
after running the calculatespeed function, the variable kbytes and kbits hold the speed values. more exact than this is imo not possible in simple javascript.
Leeus
12-31-2002, 04:05 PM
That is why I would like an alternative, can't anyone think of anything? Just an idea, I could then maybe work out the code, I was thinking timer function but you don't get that in VBScript?
scroots
12-31-2002, 06:15 PM
i once built a download calculator pritty need but it is probably lame code, i made it when i was learning javascript when i was a newbie.
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Download Time Calculator</title>
<!-- This Download calculator was made by Matthew Newton -->
</head>
<body bgcolor="#FFFFFF">
<p align="center"><font color="#FF0000" size="7"
face="Zambesi MN">Approxamate Download time calculatour</font></p>
<p>1) Input the size of the file to be downloaded</p>
<p>2) Click on the units of the file to be downloaded</p>
<p>3) Click the button labeled next 1</p>
<p>4) Input the rate of download in kb/s to the nearest whole
number lower than the rate .</p>
<p>5) Click on the units you want the time to be in</p>
<p>Note : if you just want the units in seconds Skip this bit</p>
<p>6) Click calculate</p>
<p> </p>
<form name="Calc">
<table border="4">
<tr>
<td><input type="text" size="16" name="Input"> <br>
</td>
</tr>
<tr>
<td><pre><input type="button" name="one"
value=" 1 " onclick="Calc.Input.value += '1'"> <input
type="button" name="two" value=" 2 "
onclick="Calc.Input.value += '2'"> <input type="button"
name="three" value=" 3 " onclick="Calc.Input.value += '3'"> <input
type="button" name="one1" value="Megabytes"
onclick="Calc.Input.value += '*1000'">
<input type="button" name="four" value=" 4 "
onclick="Calc.Input.value += '4'"> <input type="button"
name="five" value=" 5 " onclick="Calc.Input.value += '5'"> <input
type="button" name="six" value=" 6 "
onclick="Calc.Input.value += '6'"> <input type="button"
name="two1" value="Kilobytes" onclick="Calc.Input.value += ''">
<input type="button" name="seven" value=" 7 "
onclick="Calc.Input.value += '7'"> <input type="button"
name="eight" value=" 8 " onclick="Calc.Input.value += '8'"> <input
type="button" name="nine" value=" 9 "
onclick="Calc.Input.value += '9'"> <input type="button"
name="plus" value="Next 1" onclick="Calc.Input.value += ' / '">
<input type="button" name="zero" value=" 0 "
onclick="Calc.Input.value += '0'"> <input type="button"
name="minus" value="Hours"
onclick="Calc.Input.value += ' /60/60 '">
<input type="button" name="times" value="Mins"
onclick="Calc.Input.value += ' /60 '"></pre>
<div align="center"><center><pre><input type="button"
name="DoIt" value="Calculate"
onclick="Calc.Input.value = eval(Calc.Input.value)"><input
type="button" name="clear" value="Reset"
onclick="Calc.Input.value = ''"></pre>
</center></div></td>
</tr>
</table>
</form>
</body>
</html>
scroots
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.