Created
March 5, 2011 21:25
-
-
Save blar/856735 to your computer and use it in GitHub Desktop.
Get informations via SNMP from Apple TimeCapsule with PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# http://www.opensource.apple.com/source/net_snmp/net_snmp-127/mibs/AIRPORT-BASESTATION-3-MIB.txt | |
# snmpwalk -v 2c -c public -m AIRPORT-BASESTATION-3-MIB 10.0.1.1 enterprises.apple.airport | |
$hostname = '10.0.1.1'; | |
$password = 'public'; | |
snmp_read_mib('/usr/share/snmp/mibs/AIRPORT-BASESTATION-3-MIB.txt'); | |
snmp_set_enum_print(true); | |
snmp_set_valueretrieval(SNMP_VALUE_PLAIN); | |
$result = snmp2_real_walk($hostname, $password, 'enterprises.apple.airport'); | |
print_r($result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment