private function getPackedArchive() { global $projectTmpDir; $logFilename = $projectTmpDir . '/scan_log.xml'; $packedLogFilename = $logFilename . '.zip'; if (!is_file($logFilename)) { die(PS_ERR_NO_DOWNLOAD_LOG_FILE); } $xml_data = file_get_contents($logFilename); $archiver = new Archiver($packedLogFilename, 'a'); $archiver->createFile(basename($logFilename), $xml_data); $quarantineFilepathFilepath = $projectTmpDir . '/malware_quarantine_filepath.tmp.txt'; if (file_exists($quarantineFilepathFilepath)) { $quarantineFilepath = file_get_contents($quarantineFilepathFilepath); $archiver->addFile($quarantineFilepath, basename($quarantineFilepath)); unlink($quarantineFilepathFilepath); } $archiver->close(); $this->streamFileContent($packedLogFilename, true); unlink($logFilename); }