<?php session_start(); if(!isset($_SESSION['ID']) && isset($_SESSION['ID_old'])) { // This is just a simple test for user coming here from the correct path // and not directly session_id($_SESSION['ID_old']); $_SESSION['ID'] = session_id(); unset($_SESSION['ID_old']); // This is the main code that I want to show you guys $file = urldecode($_GET['file']); header("Content-disposition: attachment; filename=".$file); header("Content-type: ".mime_content_type("filestore/".$file)); header("Content-length: ".filesize("filestore/".$file)); header("Content-Transfer-Encoding: binary"); readfile("filestore/".$file); }
Accept-Ranges: none
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)