Forum Moderators: coopster

Message Too Old, No Replies

Safe download of files

download through a PHP script

         

anshul

11:28 am on Jul 8, 2005 (gmt 0)

10+ Year Member



How to make download of a file from a PHP script?

Generally, I can download files using 'download accelerator' as I know url of the file e.g., ~/archive.tar.tz

But sometimes ( raretimes ), I can't do that e.g., OSoft Web site.

Actually, we're making audios and videos available only to a valid user. If that files reside in filesystem, then, what are the tricks to pervent them from people, and only available to desired people through a PHP script?

coopster

1:06 pm on Jul 8, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Authenticate them first, then use PHP's Filesystem [php.net] functions to read the file and push it back to the user with your own headers.