Hi all. Does anyone know of a function that can generate a dynamic file on the fly? I would like to create a dynamic file using php on the fly (So there is no physical file and it doesnt take up any space on my server), and force a user to download it. Or at least to get the download dialog box of the browser open. Can anyone please help me out? Thank you for your time ~Gabor
what kind of file? And if its not stored on your servers drive what would it be?
Is it a dump from an SQL server, a file you're generating?
What version of PHP are you running as well.
Generate the file's contents (however you want to do that for whatever type of file you're talking about) and output it under the appropriate Content-Type: [man]header[/man] ("application/octet-stream" for generic to-be-downloaded files). Other headers can be used to fine-tune things like the file name.