Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $file = @$_GET['file'];
- $parts = explode('/', $file);
- $fileName = $parts[sizeof($parts) - 1];
- if ((isset($file)) && (file_exists($file))) {
- header("Content-type: application/force-download");
- header('Content-Disposition: inline; filename="' . $fileName . '"');
- header("Content-Transfer-Encoding: Binary");
- header("Content-length: " . filesize($file));
- header('Content-Type: application/octet-stream');
- header('Content-Disposition: attachment; filename="' . $fileName . '"');
- readfile($file);
- }
- ?>
Add Comment
Please, Sign In to add comment