<?php
#Network Traffic Monitor is an application to monitor the network traffic on all SNMP managable devices.
#
#Copyright (c) 2004, Daimler Trust nv <hide@address.com> - Jan Van Hees <hide@address.com>
#
#This file is part of Network Traffic Monitor.
#
# Network Traffic Monitor is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Network Traffic Monitor is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Network Traffic Monitor; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// require needed 2 make DB connection
require_once 'DB.php';
//dl('snmp.so');
//DB login info:
$dsn = array(
'phptype' => 'pgsql',
'username' => 'postgres',
# 'password' => 'postgrespw',
'hostspec' => '192.168.0.2',
'database' => 'monitoring',
);
// Login options
$options = array(
'debug' => 2,
);
//SQL Database connection
$db =& DB::connect($dsn, $options);
if (DB::isError($db)) {
die($db->getMessage());
}
function dblogout (&$db){
$db->disconnect();
}//function logout
?>