open($_GET['file']); $stat = $zip->statIndex(0); if (!$mime = $types[pathinfo($stat['name'],PATHINFO_EXTENSION)]) { $mime = "text/plain"; } header("Content-Type: ".$mime); header("Content-Length: ".$stat['size']); echo $zip->getFromIndex(0); ?>