CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
Bandwidth Meter?

 



mjbosko
stranger

Nov 14, 2001, 12:59 PM

Post #1 of 1 (703 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!


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives