如何在 PHP 中跟踪失败的下载?

发布于 2024-10-08 09:10:01 字数 261 浏览 0 评论 0原文

我的服务器上有视频和音频的集合,用户可以通过支付一定的费用来下载。

假设用户为我支付了金额并开始下载,但意外地下载失败了,我如何检测到这一点并可以让他再次下载。

我提供的下载链接就像rapidshare/megaupload/hotfile 等每次都是唯一的。因此,一旦用户下载了文件链接就会失效。

更新:

我想在付款后提供一次下载链接,他无法使用下载密钥反复下载。下载完成后,即使他想下载相同的东西,他也必须付费,但如果下载失败,我可以再次下载。

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 everytime 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

寂寞花火° 2024-10-15 09:10:02

你的问题很有趣,你检查过这个问题吗?

如果有效,请更新您原来的问题以回馈社区。

Your question is interesting, have you checked this question?

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

韶华倾负 2024-10-15 09:10:02

最简单的方法可能是在数据库中记录视频下载权限,并根据请求向用户提供新的下载链接。

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

栀梦 2024-10-15 09:10:02

恐怕 PHP 中没有可靠的方法来确定下载是否成功。

我想到的唯一方法是下载管理器,这是一个能够查看客户端计算机是否成功完成下载的应用程序(如果没有成功完成,则提供进一步的下载)。

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文