From 9f1f14fbf1c50179ff0f4f2aa0975616ed4044e6 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 10 Apr 2014 10:33:04 +0530 Subject: major changes done, updating to github --- full_download.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'full_download.inc') diff --git a/full_download.inc b/full_download.inc index 8c06c24..a269bd8 100755 --- a/full_download.inc +++ b/full_download.inc @@ -69,6 +69,13 @@ function textbook_companion_download_full_chapter() header('Content-Type: application/zip'); header('Content-disposition: attachment; filename="CH' . $chapter_data->number . '.zip"'); header('Content-Length: ' . filesize($zip_filename)); + header("Content-Transfer-Encoding: binary"); + header('Expires: 0'); + header('Pragma: no-cache'); + ob_end_flush(); + ob_clean(); + flush(); + readfile($zip_filename); unlink($zip_filename); } else { @@ -149,6 +156,12 @@ function textbook_companion_download_full_book() header('Content-Type: application/zip'); header('Content-disposition: attachment; filename="' . $book_data->book . '.zip"'); header('Content-Length: ' . filesize($zip_filename)); + //header("Content-Transfer-Encoding: binary"); + //header('Expires: 0'); + //header('Pragma: no-cache'); + //ob_end_flush(); + ob_clean(); + //flush(); readfile($zip_filename); unlink($zip_filename); } else { -- cgit