private function load() { $now = time(); $max_age = 130; // 2+ mins. $this->servers = array(); while (!feof($this->file)) { $line = trim(fgets($this->file, 4096)); if ($line == "--") { // Expired announcements are ignored. if ($now - $record['time'] < $max_age && count($record) >= 3) { $info = ServerInfo::constructFrom($record); $this->servers[$info->ident()] = $info; } $record = array(); } else { $parts = explode(" ", $line); $record[$parts[0]] = isset($parts[1]) ? urldecode($parts[1]) : ""; } } }