Jump to content

Archived

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

legohead6

Changing "from" name in force download!

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]

Share this post


Link to post
Share on other sites

×

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.