
mjbosko
stranger
Nov 14, 2001, 12:59 PM
Post #1 of 1
(498 views)
|
|
Bandwidth Meter?
|
Can't Post
|
|
I need to implement a bandwidth meter using cgi/perl -- similar to that which I found at http://www.dslreports.com. Apparently this system (and many others like it) include the contents of a large file (~500k worth of junk text) that gets sent to the user's browser. It mustn't get cached either so that it can be run again by the same user. The time is checked before the 'junk' is sent, and then checked again afterward. The time is then converted to kbps using the time and the amount of bytes sent (typically 500). Example follows: Eg. : : < scrip... < ! - - time = new Date(); starttime = time.getTime(); // - - > ../script> < ! - - U[72Fq*Я8msg : : Dvb`"G+KUh=i~ hAZg226? - - > <scrip... time = new Date(); endtime = time.getTime(); : <<calculate kbps>> : // --> .../script> Have you seen this done in perl before? Can it be done? Are there examples posted anywhere? Thanks!
|