0

How to change file header name when user request that.
for example when user open the url [dl.example.com/file.zip] for download, then browser save file with name [ex1_file.zip] instead of [file_zip].
I don't know how to handle all request and make this change in php.
Keep in mind i can't change file real name.

Edit:
I don't want code, I need a way for handle all request in one function and change header.

Edit 2:
in below question exactly say use download.php for download, but i don't have this. for example when user add url [dl.example.com/file.zip] to download manager, file name must be changed to [ex1_file].
Downloading a file with a different name to the stored name

Community
  • 1
  • 1
Micle
  • 159
  • 10
  • read this and try again. http://stackoverflow.com/help/asking we're not here to write code for you... – I wrestled a bear once. Dec 31 '15 at 21:56
  • i don't want code, i'm want solution to solve my problem. for example what file in php handle request and ... – Micle Dec 31 '15 at 21:57
  • 2
    I don't know about accessing the file directly, but this question might be helpful: [Downloading a file with a different name to the stored name](http://stackoverflow.com/q/1628260/4577762)... – FirstOne Dec 31 '15 at 21:59
  • this is good, but when user add address directly to download manager, this is not work. – Micle Dec 31 '15 at 22:02
  • 1
    @Micle, If this is not a duplicate, you should edit your question and add why and how they differ. (But if you read it, you can see that you asked to change the header and use a function, so...) – FirstOne Dec 31 '15 at 22:05

0 Answers0