note 13525 added to function.snmpwalk.php

From: Date: Wed, 20 Jun 2001 11:41:26 +0000
Subject: note 13525 added to function.snmpwalk.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-14486@lists.php.net to get a copy of this message
A quick router device view: <? include "header.html"; $host = "auscr1"; $community = "tellme"; $sysDescr = snmpget("$host","$community","system.sysDescr.0"); $ifDescr = snmpwalk("$host","$community","interfaces.ifTable.ifEntry.ifDescr"); $ifIndex = snmpwalk("$host","$community","interfaces.ifTable.ifEntry.ifIndex"); $ifAdminStatus = snmpwalk("$host","$community","interfaces.ifTable.ifEntry.ifAdminStatus"); $ifOperStatus = snmpwalk("$host","$community","interfaces.ifTable.ifEntry.ifOperStatus"); $ifLastChange = snmpwalk("$host","$community","interfaces.ifTable.ifEntry.ifLastChange"); print "<table border=1 bgcolor=#ffffff><tr><td>$host</td></tr></table><br>"; print "<table border=1 bgcolor=#ffffff><tr><td>$sysDescr</td></tr></table><br>"; print "<table border=1 bgcolor=#ffffff>"; print "<tr> <td>ifIndex</td> <td>ifDescr</td> <td>ifAdminStatus</td> <td>ifOperStatus</td> <td>ifLastChange</td> </tr>"; for ($i=0; $i<count($ifIndex); $i++) { print "<tr>"; print "<td>$ifIndex[$i]</td>"; print "<td>$ifDescr[$i]</td>"; print "<td>$ifAdminStatus[$i]</td>"; print "<td>$ifOperStatus[$i]</td>"; print "<td>$ifLastChange[$i]</td>"; print "</tr>"; } print "</table>"; ?> http://www.php.net/manual/en/function.snmpwalk.php

« previous php.notes (#14486) next »