Re: is it possible.
| From: | André Medeiros | Date: | Fri, 29 Jul 2005 13:17:51 +0000 |
| Subject: | Re: is it possible. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-219593@lists.php.net to get a copy of this message | ||
When deppending on authentication, never link the files directly.
You can create a download.php file that gets an ID through the URL,
checks if the user is authenticated and then read the file.
You will need these functions:
http://pt.php.net/file_get_contents
http://pt.php.net/header
Header() is to send the mime type, and file_get_contents is to read the
file's contents (DOH).
If you run into trouble, you can (in the order given ;):
1) Read the user's comments on both functions. They're pretty helpful
sometimes
2) Mail the ML :)