} } fclose($handle); } else { $squidclass->errno = 4; $squidclass->errstr = "Hosts file not found." . "Cant read <tt>'{$hosts_file}'</tt>."; $squidclass->showError(); exit(4); } } else { $squidclass->errno = 4; $squidclass->errstr = "Hosts file not found." . "Cant read <tt>'{$hosts_file}'</tt>."; $squidclass->showError(); exit(4); } } if (!$squidclass->connect($squidhost, $squidport)) { $squidclass->showError(); exit(1); } $data = $squidclass->makeQuery($cachemgr_passwd); if ($data == false) { $squidclass->showError(); exit(2); } // print_r($data); if (!isset($use_js)) { $use_js = true; } echo $squidclass->makeHtmlReport($data, $resolveip, $hosts_array, $use_js);