|
|
#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! |
|
|
|
|
|
#2 (permalink) |
|
Surpass Fan
Comfy Contributor
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.. |
|
|
|
|
|
#4 (permalink) |
|
He shoots.. He scores!
Super #1
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
|
|
|
|
|
|
#6 (permalink) |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,547 posts
Gave thanks: 91
Thanked 49 times
|
Have you tried the cPanel feature? Or do you not use cPanel?
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
|
|
#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.
|
|
|
|