[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] Transfer quota's, the ultimate script BUG CORRECTION !!!
- Subject: [cobalt-users] Transfer quota's, the ultimate script BUG CORRECTION !!!
- From: Marco Baurdoux <linux@xxxxxxxxxxxxx>
- Date: Wed Oct 17 06:52:06 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Hi folks,
I posted a script yesterday that would watch the quotas of webtraffic, using
PHP and webalizer.
Unfortunately Webalizer does work as I thought it would, so I had to make
another quick hack to my script, and here's how to patch it.
REPLACE :
$x = count($webalizer);
$y = $x -2;
$z = $x -1;
$line0 = explode(" ", $webalizer[$y]);
$line1 = explode(" ", $webalizer[$z]);
WITH THIS LINES :
$x = date("n") -1;
$z = $x -1;
$line0 = explode(" ", $webalizer[$x]);
$line1 = explode(" ", $webalizer[$z]);
and that should fix it.
Sorry for this mistake.
=======================================================================
Marco Baurdoux
Unix Administrator
Infomaniak Network SA
Avenue de la Praille 26
1227 Carouge
Switzerland
Tel: +41 (0)22 820 35 41
Fax: +41 (0)22 820 35 46
http://web.infomaniak.ch
Linux/Unix is very user friendly,
it's just very picky about who its friends are !!!
=======================================================================