Bandwidth monitor script

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
I need a script, that is able to show all-time used bandwidth on a single page, on the homepage. Do anyone know of a script that can do this?

Example: I run a file host, I want to be able to show the ammount of downloaded data since the start of the file host.
 

REBEL21

New Member
Messages
355
Reaction score
0
Points
0
i need the same as well as my aw stats are not working at the moment!!!
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
Google is useless as always, because it just brings up windows apps etc
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
Nah I found an solution. I did this:

PHP:
$bwfile = filesize("./storage/".$validdownload[0]);
$bwfile = $bwfile / 1024;

$file = 'c:/wamp/www/file/secure/stat.txt' or die('Could not open file!');

$fh = fopen($file, 'rb') or die('Could not open file!');
$data = fread($fh, filesize($file));
fclose($fh);

$result = $data+$bwfile;
$fh = fopen($file, 'w') or die('Could not open file!');
fwrite($fh, $result) or die('Could not write to file'); 

fclose($fh);

Where $validdownload[0] contains the filename
 

burner35

New Member
Messages
127
Reaction score
0
Points
0
Exactly how I did mine vigge! :D It's a good feature for websites with Coders.
 
Top