$ip\n"; } $xml = "\n"; $xml .= "\n"; $xml .= $list; $xml .= "\n"; file_put_contents($config,$xml); return 0; } function getports(){ global $nports, $portspath, $port0; $res = "\t\n"; for($i=0;$i<$nports;$i++){ $sensor = $portspath."/sensor{$i}0"; // the file is always there actually if(is_file($sensor)){ $c = trim(file_get_contents($sensor)); $p = $port0+$i; $res .= "\t\t$c\n"; } } $res .= "\t\n"; $xml = "\n"; $xml .= "\n"; $xml .= $res; $xml .= "\n"; return $xml; } function send_zipped_images($ips){ } ?>