diff options
author | Minteck <minteck@phoenixnet.tech> | 2021-10-31 12:44:27 +0100 |
---|---|---|
committer | Minteck <minteck@phoenixnet.tech> | 2021-10-31 12:44:27 +0100 |
commit | 7bbb59948928e590841e4af440b0b764a147e450 (patch) | |
tree | 56d8e7ec09db8ea26939c2dc6b44136e6aa6ba12 /download | |
download | share-7bbb59948928e590841e4af440b0b764a147e450.tar.gz share-7bbb59948928e590841e4af440b0b764a147e450.tar.bz2 share-7bbb59948928e590841e4af440b0b764a147e450.zip |
Initial commit
Diffstat (limited to 'download')
-rw-r--r-- | download/index.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/download/index.php b/download/index.php new file mode 100644 index 0000000..d49bf6a --- /dev/null +++ b/download/index.php @@ -0,0 +1,34 @@ +<?php + +session_start(); + +if ($_SERVER['SERVER_NAME'] !== "flsh.sytes.net") { + header("Location: /"); + die(); +} + +if (isset($_GET['i'])) { + $id = $_GET['i']; +} else { + header("Location: https://share.familine.mooo.com"); + die(); +} + +if ($id !== $_SESSION["dlid"]) { + die(); +} + +$file = $_SERVER['DOCUMENT_ROOT'] . "/private/shares/" . $_SESSION['filename']; + +header('Content-Description: File Transfer'); +header('Content-Type: ' . mime_content_type($file)); +header('Content-Disposition: attachment; filename="' . str_replace("\"", "''", $_SESSION['name']) . '"'); +header('Content-Transfer-Encoding: binary'); +header('Content-Length: ' . filesize($file)); +header('Expires: 0'); +header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); +header('Pragma: public'); +ob_clean(); +flush(); +readfile($file); +exit; |