Forum Moderators: coopster

Message Too Old, No Replies

download track

         

whxglj

11:20 pm on Mar 11, 2004 (gmt 0)

10+ Year Member



Hello sir:

I have a website support some big files(200-800M) download. I want to control download .
I use Php +mysql to control it to prevent other people to link and download.
Because my webhost control ftp is difficult.
so I use http download.
But I do not know to use php script to detect one user have finish download,I want one user download one file at one time.
Anyone have good idea for me.
Thank you

thijsnetwork

4:13 pm on Mar 13, 2004 (gmt 0)

10+ Year Member



I don't think this is possible using the current HTTP-protocol, because the http-client (webbrowser) doesn't send an message to the server when a download is finished.

dcrombie

6:25 pm on Mar 13, 2004 (gmt 0)



You'd have to monitor the log file - it records the download when it finishes.

justageek

7:04 pm on Mar 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It is possible to do it. You just have to control the download. I need to keep stats on when certain things are delivered to the user and the way I do it is by first putting an entry a db for the user. I then chunk the file to them which I use to see how much of the file has been sent. This way I know if a user has the entire file or what percentage of the file was sent.

You could probably do the same and change it just a little. When you start to download the file use the db to insert the user record and just check that information to see if the user tries another download. Once the download is done just remove the db entry.

For the aborted downloads use the connection_status() so you can clean up any orphan records.

JAG