--- [EMAIL PROTECTED] wrote: > I read this article, and thought it was perfect for me... > Just the same prob I'm having... > http://forums.devshed.com/archive/5/2002/06/2/37330 > > However, I don't understand how to get the file into an <A> tag > where it can still find the file, AND make the URL useless if > copied and pasted..
The URL in your link will be to a PHP page that you write, not the document you want them to receive. For example: <a href="http://example.org/getfile.php?file=/tmp/file.txt">Click</a> Something like that, anyway. Your getfile.php script is responsible for: 1. Making sure the filename sent from the client ($_GET['file']) is something they have access to. You probably want to make sure it's not /etc/passwd or something, right? 2. Fetching the file from the filesystem. You just read it in like any other file. The readfile() function is probably handy here. 3. Sending the appropriate content type header, such as header('Content-Type: text/plain'); Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php