Web Development

General discussion


Members signup and authentication

By johno69 ·
I need to add a members only area to my site, primarily to limit access to PDF documents. There are lots of scripts out there, that work well enough, but they require inserting a script at the head of the document you wish to protect - obviously I can't do this for PDF doc's.

Does anyone know of a free/cheap set of scripts (preferably PHP/mySQL) that will allow members to sign-up and provide authentication and protection for PDF docs?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Use a secured PHP file for relaying

by acostin In reply to Members signup and authen ...

What we do (http://www.interakt.ro/) to protect sensitive information is to place the files in a secured folder on the server (out of the HTTP root or secured with a .htaccess file), and then provide a PHP file (that includes a session based authentication system), that will receive the file id for download and then will send it to the client using:

Header("Content-Type: application/x-octet-stream");
Header("Content-Disposition: attachment; filename=".$arr[$i]);

And then fpassthru - as below :
<a href=http://ro.php.net/manual/en/function.fpassthru.php>PHP.net</a>


Related Discussions

Related Forums