Script ascuns url google drive download

AlexH

Merg pe strada catre Mine...
Membru personal
Administrative
Freelancer
SEO Expert
Am acest code de mai jos si as vrea customizat ca atunci cand userul da click download sa porneasca dar fara sa afiseze url de la google drive.
Tot ce vreau e ca link de la google drive sa fie ascuns si userul sa nu`l vada.
Cod:
$path = 'https://drive.google.com/file/d/1rEniVhEU91YVylt8-pzwL8ZyGpR8h5hF'; // the file made available for download via this PHP file
$mm_type="application/octet-stream"; // modify accordingly to the file type of $path, but in most cases no need to do so

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Type: " . $mm_type);
header("Content-Length: " .(string)(filesize($path)) );
header('Content-Disposition: attachment; filename="'.basename($path).'"');
header("Content-Transfer-Encoding: binary\n");

readfile($path); // outputs the content of the file

exit();

Ma poate ajuta cineva?
 
Cod:
$path = 'https://drive.google.com/file/d/1rEniVhEU91YVylt8-pzwL8ZyGpR8h5hF'; // the file made available for download via this PHP file
$mm_type="application/octet-stream"; // modify accordingly to the file type of $path, but in most cases no need to do so

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Type: " . $mm_type);
header("Content-Length: " .(string)(filesize($path)) );
header('Content-Disposition: attachment; filename="'.basename($path).'"');
header("Content-Transfer-Encoding: binary\n");

readfile($path); // outputs the content of the file

exit();
chiar daca ai face asa, ar consuma prea multe resurse, intrucat vei citi tot fisierul pe banda ta, pe resursele tale, ca si cum ar fi gazduit de tine
 
Loading...
Back
Sus