Checking successful download

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kinger88
Forum Newbie
Posts: 12
Joined: Thu Apr 09, 2009 10:08 am

Checking successful download

Post 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
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Checking successful download

Post by Darhazer »

Check the connection status - if it's not aborted, there is a good chance the download was successful.
kinger88
Forum Newbie
Posts: 12
Joined: Thu Apr 09, 2009 10:08 am

Re: Checking successful download

Post 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
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Checking successful download

Post by Darhazer »

Check in the shutdown function of the script (obviously, first register one)
Post Reply