RE: [PHP] How do I protect downloadable files?
| From: | Andrew Séguin | Date: | Wed, 31 Dec 2003 02:32:13 +0000 |
| Subject: | RE: [PHP] How do I protect downloadable files? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173525@lists.php.net to get a copy of this message | ||
I have not tested with mac but I had problems with certain versions of IE
in a similar script where it would basicaly show the binary content within
IE rather then initiate a download.
What I saw was when I verified the headers returned, the headers were
repeated. Therefore I had something like:
------
Content-Type: text/html
X-Powered-By: php...
Content-Type: immage/gif
------
What worked for me and might help you is if you used header($header, TRUE)
to force a replacement of all Content- headers that might have been set by
php (like Content-Type: text/html)
I would simply suggest comparing the headers you get when you download the
file directly compared to when you get the headers from your PHP script.
For this a variety of tools are at your disposition, proxomitron's log
window being one of my favorites.
Once you have an identical set of headers, well... I can't think of any
reason for it to fail on mac (unless the original download would fail as
well ;) ).
Hope it helps,
Andrew
> Time for them to upgrade to OSX...
>
> I've not tried to crack that nut. Is there anyone here who has
> successfully
> managed headers for Mac users? It's hard to believe it hasn't been done.
> ...