'; $servers = array( array( 'name' => 'turtle', 'ping' => 'http://78.46.47.73/turtle_ping.php', 'excludes' => array('/lib/init/rw', '/dev/shm', '/boot', '/dev'), 'color' => '#3b5998', ), array( 'name' => 'popeye', 'ping' => 'http://london-office-assistant.co.uk/turtle_ping.php', 'excludes' => array('/lib/init/rw', '/dev/shm', '/boot', '/dev'), 'color' => 'orange', ), array( 'name' => 'razor', 'ping' => 'http://bghelp.net/turtle_ping.php', 'excludes' => array('/lib/init/rw', '/dev/shm', '/boot', '/dev'), 'color' => 'purple', ), array( 'name' => 'MIW', 'ping' => 'http://makeitweb.co.uk/turtle_ping.php', 'excludes' => array('/lib/init/rw', '/dev/shm', '/boot', '/dev'), 'color' => 'blue', ), array( 'name' => 'VW', 'ping' => 'http://blago.vikiwat.com/turtle_ping.php', 'excludes' => array('/lib/init/rw', '/dev/shm', '/boot', '/dev'), 'color' => '#ff00d6', ), ); foreach ($servers as $k => $v) { $data = file_get_contents($v['ping']); $data = unserialize($data); $charts = ''; if (is_array($data)) { foreach ($data as $key => $val) { if (in_array($val['mounted_on'], $v['excludes'])) { continue; } $c++; $pie = ' { value: '.($val['bavail']).', color:"green" }, { value: '.($val['bused']).', color:"#b60000" }, '; $pie = substr(trim($pie), 0, -1); $charts .= '
'.$v['name'].'
'.$val['mounted_on'].'
'.(isset($_GET['more']) ? ' ' : '').'
usage: '.$val['use'].'
available: '.$val['available'].'
used: '.$val['used'].'
'; } } else { $charts = 'Communication error for '.$v['name'].''; } echo $charts; } ?>