PDA

View Full Version : Display Bandwidth usage


rex_b
11-08-2004, 12:57 AM
Have a display box showing:

We have used this much bandwidth this month, and we have this much left.

How hard would that be to make?

Benj
11-08-2004, 07:15 AM
interesting

Beermonster
11-08-2004, 08:42 AM
It's something I've been working on, not only showing the bandwidth but also other server stats, here's the work so far http://www.scale-models.co.uk/bandwidth.php

TheMusicMan
11-08-2004, 09:03 AM
Here's something I spotted the other day on my webhosts forums.


http://www.xpenguin.com/calcbandi.php

... and then setup a cron file that checks your pages every 30 minutes or so and updates a file with your bandwidth usage for the day.

Then you could a header that gets included in all pages with a simple:

CODE

<?php

if($bandwidth > 120000)
echo "Sorry, try back tomorrow. Donations are appreciated.";

else
//display the normal page

?>



(Oversimplified a bit of course)

Freezerator
11-08-2004, 09:04 AM
That is simply displaying the mrtg graphs and pointing to your webalizer stats.

To use that, you must install mrtg (linux only?) and make a seperate page where you link to that.

Beermonster
11-08-2004, 09:28 AM
That is simply displaying the mrtg graphs and pointing to your webalizer stats.

To use that, you must install mrtg (linux only?) and make a seperate page where you link to that.


It is, unless you can think of any other way of getting server stats? I have been doing this just for my own use and not really gone too far in to it, but I'm sure there is a better way, also mrtg works on Unix & NT

Remi
11-08-2004, 11:53 AM
Very interesting :)

rex_b
11-08-2004, 01:13 PM
It's something I've been working on, not only showing the bandwidth but also other server stats, here's the work so far http://www.scale-models.co.uk/bandwidth.php


ooooh.. gimme gimme.!!!