Jump to content

Changing "from" name in force download!


legohead6

Recommended Posts

I want to change where it says the file is from in the force download code in the code recipretory..here it is with a tiny bit of modification

[code]<?PHP
$name=$_REQUEST['file'];
$fname=base64_decode("$name");
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

header("Content-Type: application/force-download");
header( "Content-Disposition: attachment; filename=User Agreement");

header( "Content-Description: File Transfer");
header('Accept-Ranges: bytes');
    header('Content-Length: ' . filesize($fname));
@readfile($fname);
exit;
?>[/code]

Link to comment
https://forums.phpfreaks.com/topic/16045-changing-from-name-in-force-download/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.