I'm almost sure I know the answer to this, but it won't hurt if I ask.
I want to create a link so that people can download my CV, an RTF document. Of course, I can make a direct link like /download/cv.rtf. A link like this is good because people have the choice of right-clicking it and selecting "Save Target As..." to download the file. If you have MS Word installed and left-click such link, the document will be automatically opened in Word, not saved to disk.
But I don't want a direct link. I want a link to a PHP script instead, so that it can track the download and run a couple of other errands for me. The only idea I've had so far is having the script redirect the visitor's browser to the link at /download/cv.rtf URL. But then it will function like a left click and actually downloading the file will be almost impossible. Again, I could zip the document and make a link to /download/cv.zip, but I don't want that either. I want to force browsers to download an RTF file and save it to disk. Damn, I want to able to force them to download even TXT files without opening if possible.
Can PHP perform such antics?
Thank you,
Luciano ES
Santos - SP - Brasil