Page 1 of 1

Checking successful download

Posted: Thu Aug 27, 2009 5:17 pm
by kinger88
Hi,

Can anyone help me or point me in the direction of something that will...

I'm building a site which will have paid downloads.

I would like to ensure a file can only be downloaded once but at the same time make sure the download was successful before closing off the link

I've used websites which say the links die after a successful download so im guessing there is a way to check if a download was successful or not?

Cheers

Re: Checking successful download

Posted: Thu Aug 27, 2009 5:29 pm
by Darhazer
Check the connection status - if it's not aborted, there is a good chance the download was successful.

Re: Checking successful download

Posted: Thu Aug 27, 2009 6:06 pm
by kinger88
Thanks, I will look in to it.

How do I know this code is running after the download is complete and not when the download has just started?

Cheers

Re: Checking successful download

Posted: Fri Aug 28, 2009 9:04 am
by Darhazer
Check in the shutdown function of the script (obviously, first register one)