$filename = "SpamAssassin-loop_true-unreach-call.c.below.out"; header("Content-Type: text/plain"); set_time_limit(300); // One really hopes it doesn't take that long function not_eof($str) { if ($str === "0") { return TRUE; } // great idea, PHP designers! if ($str) { return TRUE; } return FALSE; } $zipfilename = $filename . ".zip"; echo("Note: You are viewing an ICRA output file that has been compressed\n"); echo(" for easier storage. If the decompression process (which uses a\n"); echo(" PHP script) causes problems, try replacing '.php' at the end of \n"); echo(" the file name with '.zip' to download the compressed version \n"); echo(" directly; then, simply decompress the zip file.\n\n"); $zip = zip_open($zipfilename); if ($zip) { while ($zip_entry = zip_read($zip)) { if (zip_entry_open($zip, $zip_entry)) { while(not_eof($contents = zip_entry_read($zip_entry))) { echo "$contents"; } zip_entry_close($zip_entry); } if (zip_entry_name($zip_entry) == $filename) { break; } } zip_close($zip); } else { echo "ERROR while attempting to uncompress $zipfilename."; } ?>