icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old July 24th, 2007, 9:15 PM   #1 (permalink)
Registered User
Seasoned Poster
 
Joined in Mar 2007
36 posts
Gave thanks: 3
Thanked 0 times
Password Protecting Folder

I have videos stored in a folder that I want to password protect. Currently users log into my system to get to the videos, but technically there is nothing stopping someone from going straight to the video if they know the URL. They could find the URL out by logging in on someone's account and then viewing source. I need to prevent this. If I password protect the folder how do I grant myself access in my php file so I can display the videos for the users? Also is there a way to eliminate view source all together?

Thanks so much for the help!
jacker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 24th, 2007, 10:48 PM   #2 (permalink)
Surpass Fan
Comfy Contributor
 
Rick's Avatar
 
Joined in Sep 2004
Hosted on Pass42
279 posts
Gave thanks: 4
Thanked 50 times
Can you move the folder with the videos to a folder above you public_html folder? You would have to modify your php scripts, but your videos would be unreachable via a URL.

I do this with images in my photo gallery and it works great.

Last edited by Rick; July 24th, 2007 at 10:50 PM..
Rick is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 24th, 2007, 11:19 PM   #3 (permalink)
Registered User
Seasoned Poster
 
Joined in Mar 2007
36 posts
Gave thanks: 3
Thanked 0 times
I could do that put I'm not sure exactly what I would need to do in my php scripts to access them then. Can you elaborate a little?
jacker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 24th, 2007, 11:24 PM   #4 (permalink)
He shoots.. He scores!
Super #1
 
puckchaser's Avatar
 
Joined in Feb 2007
Lives in A room with no windows.
Hosted on SH110
1,449 posts
Gave thanks: 46
Thanked 140 times
most likely, you have some path defined in your script to access the files. If you put them above the public_html folder you would have to reference the location like this.

/home/username/video

the path to your website would be

/home/username/public_html/

So an address like
http://www.mydomain.com/video

would be the same as

/home/username/public_html/video

If you put the video directory above public_html, then people couldnt browse to it, but you could call the directory from PHP.

Hope that helps and doesnt confuse....
__________________
SH110
puckchaser is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 24th, 2007, 11:45 PM   #5 (permalink)
Registered User
Seasoned Poster
 
Joined in Mar 2007
36 posts
Gave thanks: 3
Thanked 0 times
No that makes perfect sense. Can't believe I didn't think of that. I sitll want to password protect it, but that will be a quick fix for now.
jacker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 26th, 2007, 3:53 AM   #6 (permalink)
Bow before Surpass!
Super #1
 
Joined in Sep 2004
1,547 posts
Gave thanks: 91
Thanked 49 times
Quote:
Originally Posted by jacker View Post
No that makes perfect sense. Can't believe I didn't think of that. I sitll want to password protect it, but that will be a quick fix for now.
Have you tried the cPanel feature? Or do you not use cPanel?
__________________
GamingHybrid is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 31st, 2007, 1:29 PM   #7 (permalink)
Registered User
Seasoned Poster
 
Joined in Mar 2007
36 posts
Gave thanks: 3
Thanked 0 times
I do use CPanel, but I have never used the fuction for password protecting directories. I just didn't know how off the top of my head and didn't mess with it to see how easy it was to use.
jacker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

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