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

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

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



Nov 14, 2001, 12:59 PM

Post #1 of 1 (758 views)
Bandwidth Meter? Can't Post

I need to implement a bandwidth meter using cgi/perl -- similar to that which I found at 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:

< scrip...
< ! - -
time = new Date();
starttime = time.getTime();
// - - >

< ! - -
Dvb`"G+KUh=i~ hAZg226?
- - >

time = new Date();
endtime = time.getTime();
<<calculate kbps>>
// -->

Have you seen this done in perl before? Can it be done? Are there examples posted anywhere?



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

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