Skip to content

Instantly share code, notes, and snippets.

@blar
Created March 5, 2011 21:25
Show Gist options
  • Save blar/856735 to your computer and use it in GitHub Desktop.
Save blar/856735 to your computer and use it in GitHub Desktop.
Get informations via SNMP from Apple TimeCapsule with PHP
<?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