Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Password Protect Directory using Forum Login details
Old 04-28-2010, 10:44 AM Password Protect Directory using Forum Login details
Novice Talker

Posts: 5
Name: Gary
Trades: 0
Hi,

Im building a site that will have alot of pictures and videos uploaded but will also have a forum.

I will be using XMB forum. I have tried to do this all in Joomla but i dont know it very well so am wanting help in doing it the following way.

So I will upload new material about 2 times a week to pages within a folder, I want to password protect this folder so that only members who register in the forum can look at it.

I dont want members to have 2 register twice, once for forum and another time for password protected directory.

Is there any way or script i can use that can register the user for both the forum and directory?
Or when user registers in forum automaticlly use these details for protected directory?

Thanks
dilwsi is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-29-2010, 06:31 AM Re: Password Protect Directory using Forum Login details
Extreme Talker

Posts: 181
Name: David Jackson
Trades: 0
embed the pics and vids in a page of your site and deny access to the page rather than the directory. You can cover direct access off using .htaccess when you go live with your site
__________________

Please login or register to view this content. Registration is FREE
davidj is offline
Reply With Quote
View Public Profile
 
Old 05-23-2010, 03:25 AM Re: Password Protect Directory using Forum Login details
Average Talker

Posts: 15
Name: Gordon
Trades: 0
Another solution would be to:

  1. store the files in the folder as desired.
  2. use modrewrite / .htaccess to rewrite all requested files to securefile.php?filewas=123.jpg
  3. securefile.php checks the XMB session data to confirm the user is logged in
  4. if not logged in, header / redirect
  5. if logged in, readfile() the contents of the requested file.
I use this sort of system a lot on various different sites, it makes it easy to add password protected content, as you can now just upload the files to the folder and they're instantly protected.

A bit more info about a related system I built based on Joomla sessions here: http://www.incero.com/webdev/securin...login-sessions
__________________
Gordon Page [
Please login or register to view this content. Registration is FREE
]

Please login or register to view this content. Registration is FREE
gordonrp is offline
Reply With Quote
View Public Profile
 
Old 05-24-2010, 02:50 AM Re: Password Protect Directory using Forum Login details
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
Solution 1: on successful registration or password change export user credentials to .htpasswd file for your protected dir.

Solution 2: us apache mod_auth_db module to read login credentials from db instead of text file.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Reply     « Reply to Password Protect Directory using Forum Login details
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.61116 seconds with 12 queries