diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-24 15:37:01 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-08-24 15:37:01 +0200 |
commit | e3298dbeaae79bb1d384fa8cd78a67be89819720 (patch) | |
tree | 871560e330f6c7225fb50ae86e3586776d81356a /sample.php | |
download | kartik-net-e3298dbeaae79bb1d384fa8cd78a67be89819720.tar.gz kartik-net-e3298dbeaae79bb1d384fa8cd78a67be89819720.tar.bz2 kartik-net-e3298dbeaae79bb1d384fa8cd78a67be89819720.zip |
Initial commit
Diffstat (limited to 'sample.php')
-rw-r--r-- | sample.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sample.php b/sample.php new file mode 100644 index 0000000..1d534dd --- /dev/null +++ b/sample.php @@ -0,0 +1,20 @@ +<?php
+
+$filename = $_SERVER['DOCUMENT_ROOT'] . "/packages/sample.zip";
+
+header('Content-Description: File Transfer');
+header('Content-Type: application/octet-stream');
+header("Cache-Control: no-cache, must-revalidate");
+header("Expires: 0");
+header('Content-Disposition: attachment; filename="sample.zip"');
+header('Content-Length: ' . filesize($filename));
+header('Pragma: public');
+
+//Clear system output buffer
+flush();
+
+//Read the size of the file
+readfile($filename);
+
+//Terminate from the script
+die();
|