Hey hey every1,
I'm setting up a sales page for a digital download product, where I (naturally) want to obscure the actual file path of the download to avoid abuse and spreading of the actual link.
Ideally, I want:
1) The href/download path to be shown as encrypted in the status bar when hovering over it (I got this figured out with base64 encoding)
2) When clicking on the link to download it - the actual file path should not be shown to the user anywhere. The address bar should read as an encrypted path like www.mysite.com/download.php?here=cd8sdbn2cd9az
3) Most importantly, the encrypted link should change every time - but here is where I run into trouble. If I tell base64 to encode a "secret path" string (such as a server-side folder name where the file actually resides like /myfileishere/file.txt), this path will have to be the same every time, and this kinda defeats the purpose. Obviously the actual file path should be permanent, but how can I randomly variate and expire the URLs given to visitors?
In other words - I would like for the encrypted URL / visible download path to expire after 24 hours or so that a brand new encoded string is given to each new person who downloads. How can I do this? I've seen it done before, but would like to learn the (PHP code?) "magic" behind it.
Thanks a lot!
I'm setting up a sales page for a digital download product, where I (naturally) want to obscure the actual file path of the download to avoid abuse and spreading of the actual link.
Ideally, I want:
1) The href/download path to be shown as encrypted in the status bar when hovering over it (I got this figured out with base64 encoding)
2) When clicking on the link to download it - the actual file path should not be shown to the user anywhere. The address bar should read as an encrypted path like www.mysite.com/download.php?here=cd8sdbn2cd9az
3) Most importantly, the encrypted link should change every time - but here is where I run into trouble. If I tell base64 to encode a "secret path" string (such as a server-side folder name where the file actually resides like /myfileishere/file.txt), this path will have to be the same every time, and this kinda defeats the purpose. Obviously the actual file path should be permanent, but how can I randomly variate and expire the URLs given to visitors?
In other words - I would like for the encrypted URL / visible download path to expire after 24 hours or so that a brand new encoded string is given to each new person who downloads. How can I do this? I've seen it done before, but would like to learn the (PHP code?) "magic" behind it.
Thanks a lot!