You can set your downloads into a page that is referenced with their email, receipt number, and the download chosen. Then on the page that requests it, check the database to make sure the email and receipt number is correct for the download link. You can have it done on the same page if you wish, but I would suggest not in order to give the user some kind of notification that his request has been made (and a proper link to the file if the page doesn't automatically initiate the download)
Put the links into a form with each download link having a unique name (potentially the download name?

) and also create a unique session id for the user storing it into a hidden input field and session variable. Put the user's email and receipt number in the current session variables. When the user clicks the link and goes to the download page (we'll call it download.asp), in the download.asp page check the users email and receipt number to the corresponding download, then verifies if the session variable is true and compares it to the hidden input field in the form it just submitted. If it passes, then initiate the download. And if it doesn't initiate within 5 seconds, provide a link that refreshes the page. You can do all this or just do a URL Rewrite with Apache. This way if you do a url rewrite, when someone times in your ZIP url (
http://yourdomain.com/files/file.zip), it rewrites to.. let's say
http://yourdomain.com/registereddown...?file=file.zip. Then your download.asp file runs the code. There are many ways, but all take time and lots of code. Your best bet is to create the page and pass the download link
Something like this should work:
Dim rndID
Session("rndID") = rndID
Session("email") = Request.Form("email")
Session("receipt") = Request.Form("receipt")
response.redirect("/purchases.asp") 'or some page after login
Now on your purchase.asp page:
<script type="text/javascript">
function downloadfile(id) {
if (id == "") {
return false;
} else {
document.form.purchases.hiddenLinkID.value = id
document.form.purchases.submit()
}
</script>
<form name="purchases" id="purchases" action="/download.asp" method="post">
<input type="hidden" name="hiddenID" id="hiddenID" value="<%= Session("rndID") %>" />
link with onClick="javascript:downloadfile('linkID')"
link with linkID
<input type="hidden" name="hiddenLinkID" id="hiddenLinkID" value="" />
</form>
Now on your download page:
'check your database and compare the email and receipt for extra security.
if Len(Session("rndID")) > 0 and Request.Form("hiddenID") <> "" then
if Session("rndID") = Request.Form("hiddenID") then
Dim strFile = Request.Form("hiddenLinkID")
if Not IsNull(strFile) and strFile <> "" then
'download works here
else
response.redirect("login.asp")
end if
else
response.redirect("login.asp")
end if
else
response.redirect("login.asp")
end if
Now obviously the code isn't tested, and should only be used as a reference. But that is something that would work for you.