video file security

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
reallynew2php
Forum Newbie
Posts: 3
Joined: Mon Nov 03, 2008 12:23 pm

video file security

Post by reallynew2php »

I run an eLearning website and I store all my videos in one directory. I would like to create a .htaccess file to restrict access to this directory so that someone just can't type the url address of the video and watch it. My question is can I write code in PHP that will supply the username and password for htaccess so that I can play the video from a webpage?
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: video file security

Post by josh »

No. To worsen the problem your webserver is doing things like byte code range requests for psuedo streaming you're going to have to implement in PHP if you want PHP to be the mediator between the file and the user
Post Reply