Amar Banerjee
Amar Banerjee

Reputation: 5012

want to save file from server to client machine automatically using php

I have a requirement in my current project. I have to generate a dynamic file in server and save that file in to client machine without showing him for download. I have the code for force downloading in php. Where I can gave option to client to save a file from server to its computer. But here I want to do something like cookie works. Save file in client automatically without option to user to download it. If cookie can do the same thing there should be some way to do it. Anybody have any idea how it can be work.

Upvotes: 3

Views: 2013

Answers (1)

N.B.
N.B.

Reputation: 14091

If cookie can do the same thing there should be some way to do it.

False. Completely false, I can't stress how false this is.

You cannot save the file on someone's computer without them knowing it. Period. Anyone who gave you that task is an idiot, sorry for my choice of words, the notion of you storing something on my pc without me being notified would mean immediately that tons of websites out there would fill my computer with god knows what and I would never use internet again.

Upvotes: 5

Related Questions