jjk2 Posted July 3, 2008 Share Posted July 3, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/ Share on other sites More sharing options...
ag3nt42 Posted July 3, 2008 Share Posted July 3, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/#findComment-581032 Share on other sites More sharing options...
DeanWhitehouse Posted July 3, 2008 Share Posted July 3, 2008 a way to make it harder may be to encrypt your code, and maybe add something to the front of each file. e.g. randomword240.flv then use php to remove this word?? just throwin some random ideas out. Quote Link to comment https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/#findComment-581034 Share on other sites More sharing options...
lemmin Posted July 3, 2008 Share Posted July 3, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/#findComment-581044 Share on other sites More sharing options...
grimmier Posted July 3, 2008 Share Posted July 3, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/#findComment-581067 Share on other sites More sharing options...
discomatt Posted July 3, 2008 Share Posted July 3, 2008 Read post here regarding above snippet http://www.phpfreaks.com/forums/index.php/topic,205030.msg929653.html#msg929653 Quote Link to comment https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/#findComment-581158 Share on other sites More sharing options...
Wolphie Posted July 3, 2008 Share Posted July 3, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/#findComment-581207 Share on other sites More sharing options...
jjk2 Posted July 3, 2008 Author Share Posted July 3, 2008 i know taht a determined individual can rip contents. if majority of people do not know how rip , then its a success for me. i mean not many people know about cache and stuff. i think theres no way easy way to do it. Quote Link to comment https://forums.phpfreaks.com/topic/113103-how-to-stop-leechers/#findComment-581294 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.