te quedaria algo asi:
pero como dice sourcegeek, yo te entiendo pero vos tambien pone tu parte
Código PHP:
Ver original<?php
$f = $_GET["f"];
$file_name= $f ; //ARCHIVO A DESCARGAR
$file_download_name = $f ; //NUEVO NOMBRE DEL ARCHIVO
$file_type = "pdf"; //EXTENSION DEL ARCHIVO
if($fh = fopen($file_name, "r")){
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("content-Type: application/force-download"); //header("content-Type: application/octet-stream");
header("Content-type: application/". $file_type. "");
header("Content-disposition: attachment; filename=". $file_download_name); header("content-Transfer-Encoding: binary");
echo $file_content;
} else {
echo "error...";
}
?>