I have tried to get the name of snmp device through the below source.
$sysname1 = snmpget("192.168.0.9:161", "public", ".1.3.6.1.2.1.1.5.0.0");
$sysname2 = snmpget("192.168.0.10:164", "public", ".1.3.6.1.2.1.1.5.0.0");
$sysname3 = snmpget("192.168.0.11:165", "public", ".1.3.6.1.2.1.1.5.0.0");
$sysname4 = snmpget("192.168.0.12:166", "public", ".1.3.6.1.2.1.1.5.0.0");
Am getting only output for the first snmpget() method which is accessed through port 161. Other snmpget() is not working. As per the study 161 is default port. But I need to set different port for different IP address. Let me know how to set other port option for net-snmp