admin管理员组文章数量:1321832
The goal is after people paid (PayPal or Stripe), they land on a download page.
You upload the file to /uploads for example. You can deny access to the dir with .htaccess.
I suppose if I then create a link /uploads/product
, that a client can download it.
But that link can now be shared all over the internet.
What would be the best way to go about it?
I want to code it myself in PHP & JS if required.
The goal is after people paid (PayPal or Stripe), they land on a download page.
You upload the file to /uploads for example. You can deny access to the dir with .htaccess.
I suppose if I then create a link /uploads/product
, that a client can download it.
But that link can now be shared all over the internet.
What would be the best way to go about it?
I want to code it myself in PHP & JS if required.
Share Improve this question edited Sep 24, 2020 at 13:12 fuxia♦ 107k38 gold badges255 silver badges459 bronze badges asked Sep 23, 2020 at 18:23 progonkpaprogonkpa 1033 bronze badges1 Answer
Reset to default 1Rough idea:
- create a temporary download file. Use a random file name.
- create a program that will download the file. The program should delete the temporary download after a click on the download file link by the client
- send the download page (not the download file) link to the user, with a parameter that is the download file.
You could put some 'downloaded ok?' location on the download page, then delete the temp file afterwards.
本文标签: plugin developmentHow to create a digital product download link that can39t be used twice
版权声明:本文标题:plugin development - How to create a digital product download link that can't be used twice? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742103094a2420893.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论