Jump to content

Recommended Posts

i am wondering how i can defend myself against leechers downloading entire video content.

 

they will do http://www.asdf.com/video/0001.flv to 1232.flv

 

effectively downloading all 1232 video files.

 

how can i stop this? such as passing a special key generated by session?

 

http://www.asdf.com/video/0001.flv?key=3w4au7yo80324

 

or rename all files to e4rot2w3890qp3uywrow.flv ?

 

i would prefer not renaming all files.....because i dont know how to do it in unix env.

 

thank you.

Link to comment
https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/
Share on other sites

simple answer:

 

it does not matter what you do.. you will not be able to stop people from download your content...

 

you can select the option "Protect from import" I believe depending on which program your using to create the video. but even that can not stop it.. if its on the internet and your showing it to ppl..

 

i'm guessing by streaming.. You will never be able to keep ppl from making copies.

Link to comment
https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/#findComment-581032
Share on other sites

If you are using an Apache server then you can simply disallow file access to the folder through an .htaccess file. You should be able to do the same thing through the main server configuration file. Here is a website that talks about doing that:

http://corz.org/serv/tricks/htaccess.php

Link to comment
https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/#findComment-581044
Share on other sites

I would store your files outside your web Root. this will prevent direct downloads.

 

have your links to the files point to a download script.

<?php

echo "<a href='downloader.php?ID=FILENAME' onmouseover=\"window.status='FAKE URL TO DISPLAY IN STATUS BAR ON MOUSEOVER';return true\" onMouseOut=\"window.status='';return true\">Download</a>";

 

Then setup a download script.

 

downloader.php

 

<?php

$filename = $_GET['ID'];
$fileloc = "/PATH/OUTSIDE/WEBROOT/" . $filename; // example path would be something like "/home/USERNAME/"

header("Content-type: application/force-download");
header("Content-Disposition: attachment; filename=" . $filename);
@readfile ($fileloc);

?>

 

you can then add other features to this like using Salt to encrypt the file name and then decrypt it on the downloader php. this would further guarantee that people went through the first page to get to the file.

 

 

edited typo. there was an extra single quote

Link to comment
https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/#findComment-581067
Share on other sites

You won't be able to prevent users from directly downloading videos unless you use a password protected directory or store it outside the web root as the previous posts have stated. Though generally, when you stream videos they're stored in the cache anyway.

Link to comment
https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/#findComment-581207
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.