I am using Drupal 6, and would like to create content that can be exported. Specifically, I would like to be able to generate some random content string, and then be able to export it to the viewer as a text file. This would then pop up the usual dialog box from the browser about downloading content (etc.). I don’t need to save the file on my server, because the content is constantly changing, and would prefer a solution that could avoid that.
I am a mildly proficient programmer, but not an expert on all of Drupal’s functions. So the simpler the answer, the better.
Thanks
I found out the solution to my question. If you use php header() you will be able to accomplish this.
Here is a snippet of my code that I used to do it.
There are many things to remember when doing this, much of which is documented in the link.
Hopefully this is useful to someone else