Modify Text File Download Without Modifying Saved File?
Posted: Wed Sep 30, 2009 8:23 am
Hi. I'm new to the forum. I have a rather unusual need, and I'm seeking ideas on how to fulfill it.
I want to write a PHP script that will take an existing text file and offer it as a downloadable link on a web page. Simple enough, except that when the user clicks the link to download it, I want the file to automatically get modified on the fly before delivering it to the user. but without any changes being made to the original file stored on the server. In other words, I want to do something similar to what can be done with an image, like adding text to the image (or some other modification) before delivering it to the user; instead of modifying an image, I want to modify a .txt file (or .mobi, or .pdf, or .rtf, etc.)
Any ideas?
I want to write a PHP script that will take an existing text file and offer it as a downloadable link on a web page. Simple enough, except that when the user clicks the link to download it, I want the file to automatically get modified on the fly before delivering it to the user. but without any changes being made to the original file stored on the server. In other words, I want to do something similar to what can be done with an image, like adding text to the image (or some other modification) before delivering it to the user; instead of modifying an image, I want to modify a .txt file (or .mobi, or .pdf, or .rtf, etc.)
Any ideas?