SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
-
May 24, 2004, 09:06 #1
- Join Date
- Feb 2004
- Location
- maine
- Posts
- 5
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Allowing file to be downloaded once
Hello, folks
I need to write a script that will allow a user to download a file ONCE.
Is there any way to confirm that the download is complete and then remove the file?
Or something else?
I can think of a couple ways to do it, but there are flaws in each way - not huge flaws, but I'd like to find the best solution possible.
Thank you!
-
May 24, 2004, 09:53 #2
- Join Date
- Apr 2004
- Location
- germany
- Posts
- 4,324
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
There is no way to do it, with http at least. You can control every byte you send, but you know nothing about what the client received.
Moreover it seems not to make sense to implement such protection (for some paid contents I guess). You cannot (technically) forbid users to redistibute downloaded files...
-
May 24, 2004, 10:36 #3
- Join Date
- Feb 2004
- Location
- maine
- Posts
- 5
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It has nothing to do with the protection of distrobution.
Anyone else?
-
May 24, 2004, 10:46 #4
- Join Date
- Mar 2002
- Location
- Vancouver, BC
- Posts
- 1,971
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
well, here's an ugly way to do it.
I'm assuming all users are unregistered.
set the system up with a db:
table download:
email (downloaders email address)
filename
flag
Then ask users to input their email addresses for download.
if email address is already in db & flag is 1, do not let them download and if not, let them download and input their address in db, alongwith filename of file they are dloading and set flag to 1.
if you do not want to go with email addresses, use IPs, but it's less reliable.
I put the flag column in the table up there in case you need to let someone who has already downlaoded it once to download again. you just need to flip the flag value to zero.
hope this helps.
asT.
-
May 24, 2004, 11:01 #5
- Join Date
- Feb 2004
- Location
- maine
- Posts
- 5
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks! That is about what I came up with - just a flag to check if it has been downloaded.
Only problem I can see is people who get cut off halfway through a download and such...but I don't think there is a way around it?
-
May 24, 2004, 11:18 #6
Nope, you cant tell if a user has finished downloading the file.
Bookmarks