"; #$array=xml2array($output); #print_r($array); #exit; $device=$_GET['device']; $i=0; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://isy99/rest/nodes"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($ch, CURLOPT_USERPWD, 'admin:admin'); $output = curl_exec($ch); $array=xml2array($output); echo "
"; echo ""; foreach ($array[nodes][node] as $device) { $match=0; foreach ($blacklist as $item) { if ($device[address] == $item) { $match=1; } } if ($match == 0) { $address = "nodes/".str_replace(' ', '%20', ($device[address])); $name = $device[name]; $status = $device['property_attr']['formatted']; if ($status=="On" or $status=="true") { $i++; echo ""; echo ""; } elseif ($status=="Off" or $status=="false") { $i++; echo ""; echo ""; } if ($i==8) { echo "
".$name."
".$name."
"; $i=0; } } } echo "
"; ?>