Changes

Jump to: navigation, search

Traffic accounting with iptables

48 bytes added, 08:21, 25 December 2007
m
Sample php script to store the trafficlog in a database: use source
Below script will process traffic.log and store the data into a MySQL Database on the HOST-TO-SHOW-THE-TRAFFIC-TO-THE-USERS
<presource lang="text">
HOST-TO-SHOW-THE-TRAFFIC-TO-THE-USERS:/var/www/OPENVZ-CONTROL-WEB-SITE# cat traffic-read.php
</source>
<source lang="php">
<?
$MySQL_Host="INSERT-YOUR-MYSQL-HOST-HERE";
fclose($handle);
?>
</presource>
=== A SQL query to get the traffic for the last 30 days ===

Navigation menu