", $paths["cacti"], $snmp_query["xml_path"]); if ((empty($host["management_ip"])) || (!file_exists($xml_file_path))) { return 0; } $data = implode("",file($xml_file_path)); $snmp_queries = xml2array($data); /* fetch specified index at specified OID */ $snmp_index = cacti_snmp_walk($host["management_ip"], $host["snmp_community"], $snmp_queries["oid_index"], $host["snmp_version"], $host["snmp_username"], $host["snmp_password"]); /* no data found; get out */ if (!$snmp_index) { return 0; } db_execute("delete from host_snmp_cache where host_id=$host_id and snmp_query_id=$snmp_query_id"); while (list($field_name, $field_array) = each($snmp_queries["fields"][0])) { $field_array = $field_array[0]; if ($field_array["method"] == "get") { if ($field_array["source"] == "value") { for ($i=0;($i