Encrypt url and protect for multiple download

I am not sure if this question belongs in the PHP forum? If not please replace it to the right forum. I am working on a newsletter section for a photographer. The situation is as follows:

Someone fills out and submits the registration form after which he/she receives a confirmation email with in that email a link to finalize the registration. Clicking on that link will bring them to a thank page and the second (thank you) email is sended. In that email I have a link for downloading a free voucher. What I am looking for is a way to have the url encrypted (in the future the same folder/location will be used for free gifts) and to protect the voucher from beeing downloaded multiple times or even forwarded to other people. What would be the best solution? I can’t get my head arround one

Thank you in advance

This has been asked and solved many times already. A google search for “php one time download link” will give you many options.

I would put a unique code on each voucher and when someone hands you a voucher you check if the code has been used before and refuse the voucher if it has.

That way people can download and share vouchers all they want, but only one of them can use it.

That problem is a lot easier to solve and more foolproof then trying to prevent a voucher from being downloaded once (which is doable) or being shared (this is hard, if indeed it’s possible at all, which I doubt).

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.