Play file, prevent direct access, prevent downloading

Phoca Download - download manager
p4trick
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 26 Jul 2011, 13:48

Play file, prevent direct access, prevent downloading

Post by p4trick »

Hi,

I am facing a problem with the access of files and I hope anyone is able to help me solving the problem.

What I want to do: Play flv-files with the built-in "Play-option". It should only be visible to a certain group of users and it should not be possible to download the video.

I read this article to achieve the goal --> the video files are located outside of the public webserver directory.

Problem 1: if the file is outside of the public webserver's directory, it cannot be played :(

Problem 2: if I would move it to the inside of the webservers directory, I would need other meachanisms to prevent downloading the video with the complete URL --> e.g. .htaccess and this would pop up an ugly auth-window, which I don't want.

I hope someone got an idea about that.

Thx in advance,
p4trick
p4trick
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 26 Jul 2011, 13:48

[!! SOLVED !!]

Post by p4trick »

I solved it!

This code within the .htaccess file prevents users from accessing flv-files directly, but the video can be shown to registered users by using PD-settings.

Code: Select all

<FilesMatch "\.(flv)$">
     SetHandler application/x-httpd-php
</FilesMatch>
Greetz,
p4trick
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Play file, prevent direct access, prevent downloading

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply