PHP Applications
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Applications

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old December 15th, 2006, 07:45 PM
mskarica mskarica is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 mskarica User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Securing files from direct download

I'm going to be creating a site which allows users to listen to music, in PHP5 and MySQL. One of my main concerns is users being able to download audio or video files without me giving them access to. For example, there is a plugin for firefox which gives you the ability to download any media which is currently playing in the browser. So I can go to youtube, watch a video, and download the video to my computer while its playing. Is there any way to prevent this?

I only want users to be able to download media if I make it available to them. Can I store the media files in a directory which has no access at all, and still access those files in my application? Would that solve my problem? Would it be better if I stored the files in the database (binary)? Is it actually possible to do what I'm trying to do?

Thanks.

Reply With Quote
  #2  
Old December 15th, 2006, 09:05 PM
foreignis foreignis is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Jacksonville, FL, USA
Posts: 54 foreignis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to foreignis
RE: Securing files from direct download

i don't think there's a way to let people view something but not "download it". Just by viewing it, they are downloading it. I could be wrong about this...

Reply With Quote
  #3  
Old December 16th, 2006, 12:24 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Securing files from direct download


Reply With Quote
  #4  
Old December 16th, 2006, 12:26 AM
mskarica mskarica is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 mskarica User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Securing files from direct download

Really, I'm just trying to prevent folks from being able to save the media files to their computer......if possible.

Reply With Quote
  #5  
Old December 16th, 2006, 01:22 AM
foreignis foreignis is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Jacksonville, FL, USA
Posts: 54 foreignis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to foreignis
RE: Securing files from direct download

that's called downloading ;) see above

Reply With Quote
  #6  
Old December 16th, 2006, 02:07 AM
mskarica mskarica is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 mskarica User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Securing files from direct download

Alright well, you said you could be wrong.....so can somebody prove him wrong?

Reply With Quote
  #7  
Old January 7th, 2007, 03:53 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Securing files from direct download

What you’re looking for is some kinda anti-leech system. what it does is mealy mask the true address of the media files. Although, for a smart programmer this type of security wouldn't be enough to shop them from finding the true address.

Reply With Quote
  #8  
Old January 8th, 2007, 02:33 AM
IAmALlama IAmALlama is offline
Me
Click here for more information. Click here for more information
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 991 IAmALlama User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 20 h 4 m 37 sec
Reputation Power: 2
RE: Securing files from direct download

he is exactly right, you can't have streaming media without some way for them to download it. when they stream it, it is actually downloading (buffering) to the computer in the cache. not hard for someone to save it by viewing the source of the page and getting the filename. then it is an easy download from there.

you might try some sort of php passthrough system. kinda like you said, .htaccess deny from all (or whatever it is) in the media directory then use a php script to access the file called by an id number. you could use sessions, like when they access the media page write a timestamp to sessions along with the file id. in the php passthrough script check to see if the session is set and is not over x seconds. if that time has passed, don't allow the file to be loaded. if you set it to like 5 seconds, they would have to reload the page and start the download within 5 seconds. problem is that if it is too low, the plugin will time out on slower connections/computers. also if there is an extention that gets the cached filename, you could just copy the cached file and rename it.

the only other option I might suggest is to have a low quality version for streaming and allow for them to download a high quality version.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Applications > Securing files from direct download


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway