$device_query=mysql_query("SELECT id,hostname,community,snmpver FROM `devices` WHERE `id` LIKE '%".$argv[1]."' AND status = '1' AND os != 'Snom' ORDER BY id DESC");
while($device=mysql_fetch_row($device_query)){
$id=$device['0'];
$hostname=$device['1'];
$community=$device['2'];
$snmpver=$device['3'];
$interfaces=`snmpwalk -O nsq -v2c -c $community $hostname ".1.3.6.1.2.1.2.2.1.2" | sed s/ifDescr.//g | sed s/\ \"/\|\|\"/g | sed s/\ /\|\|/g`;