开发者

How to track failed downloads in PHP?

开发者 https://www.devze.com 2023-01-31 18:05 出处:网络
I have collection of videos and audios in my server, where users can download by paying some amount. Suppose user pay the amount for me and start the download but accidentally the download fails how c

I have collection of videos and audios in my server, where users can download by paying some amount.

Suppose user pay the amount for me and start the download but accidentally the download fails how can i detect that and i can provide him to download again.

The download link i provided is like rapidshare/megaupload/hotfile etc eve开发者_如何学Gorytime unique. So once user downloaded the file link will die.

Update:

I want to provide the download link once after paying he can't download again and again by using the download key. Once download is completed even if he wants to download same thing he has to pay but if download fails then I can give to download again.


Your question is interesting, have you checked this question?

If it works, please update your original question to give the community something back.


The simplest way might be recording the video download permissions on the database and giving the user a new download link on request.


I'm afraid there is no reliable way in PHP to determine if the download was successfull.

The only way that comes to my mind is a download-manager, an application that is able to look at the client's machine, if the download was successfully finished(and provide further download if not).

0

精彩评论

暂无评论...
验证码 换一张
取 消