<? ob_start();
  require(dirname($_SERVER['PHP_SELF'])."/../include/functions.inc.php");
  $port = $argv[1];
  $id = $argv[2];
  $host = $argv[3];
  $uptime = NULL;
  if ($dataset = webget($host.":".$port."/7.html")) {
    $dataset = preg_replace("/.*<body>/", "", $dataset);
    $dataset = preg_replace("/<\/body>.*/", "", $dataset);
    $entries = explode(",",trim($dataset));
    $output = $entries[0]."\n0\n".$uptime."\n".$host.":".$port."\n";
  } else {
    $output = "0\n0\n".$uptime."\n".$host.":".$port."\n";
  }
  ob_end_clean();
  echo $output;
?>
