Re: Downloads for subsrcibers only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/1/07, Mário Gamito <gamito@xxxxxxxxx> wrote:> Hi,>> I made this site in PHP that has a page with some PDFs to download.> My costumer wants that only subscribed people are allowed to download> the PDFs.>> I've already made the subscrbe and login mechanism.>> Now, my question for you is about letting only subscribers download the> PDFs.> What is the best approach ?> Register a session when they login and then in the PDFs page apply a>> if email is registered>   you can download the PDFs> else>   you can't>> Something like this ?> Or is it there a better way ?>> Any help would be appreciated.>> Warm Regards> --> :wq! Mário Gamito>> --> PHP General Mailing List (http://www.php.net/)> To unsubscribe, visit: http://www.php.net/unsub.php>>
One popular method is to place your files outside of the webroot.This makes it so people cannot access the files directly.  Then createa PHP script to read the file to the user with the correct mime typeusing a header() call.  This way you force the user to have anauthenticated session before a file download is started.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux