maybe a trivia question, but i do not know the answer. how can i return any type of file to the browser to call a 'save as...' window?
how can i generate a file on the fly and cause the browser to make this file download? is it possible without creating the file physically? i am talkig XXkb files maximum, of course.
Check the header() function.
What you need is header("Content-type: application/octet-stream");
For assigning it file name as well, you'll also need to play with header("Content-Disposition: attachment; filename=filename.ext");