Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Protect files for subscribers only

Status
Not open for further replies.

TheDust

Programmer
Aug 12, 2002
217
US
I am going to be attempting to build a site where you pay to download reports. I can build the whole thing, except for I'm unsure how to approach protecting the actual Word docs, Excel spreadsheets, etc. from non-subscribers.

Does anyone know how to use PHP in order to do this? I need to be able to send users to a login page if they haven't signed in already before they can gain any direct access to these files.
 
You may want to post a pointer to this question in the PHP forum: forum434

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Sorry guys... this should have been posted in the PHP forum. My bad.
 
TheDust said:
I'm unsure how to approach protecting the actual Word docs, Excel spreadsheets, etc...
I need to be able to send users to a login page...before they can gain any direct access to these files
Hmm. I'm sure the suggestions of the php forum are well intentioned, but to protect the actual docs, you're going to need more than plain old PHP.

You can use Apache's straightforward Auth (.htacccess) protection (Apache - forum65) or you can integrate another apache auth method.

Another alternative is to make the docs inaccessible from the web (i.e. you can't type - instead, they're stored elsewhere on the server, and if requested - and permission granted, sent by php using it's file accessing methods.

<marc>
 

Why not simply use the built in password protection features of Word, etc to do this, and only give the password to subscribers?

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top