Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

The basic of what I need;

A public page where the visitor have to fill out a form in order to be able to download a large file (the one and the same file for all downloads/users). The file should only be available trough something like a temporary url for a specific amount of time from when the form was submitted. In other words, time limited access to the file for a specific user.

To create and setup the form is no problem, but making the file accessible for a limited amount of time to the user whom submitted the form is a completely different story. I have no good ideas on how to create time limited access. Don't know where to start.

Any ideas on how to create this with WordPress? Plugin suggestions are welcome too.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

a simple way would be to set a cookie with a timestamp when they submit the form, then check for the cookie and valid timestamp when they hit the url to download the file.

a more complicated process would be to generate a unique url key for each user, put that in a db table with a timestamp, then look up the url, check the time and then delete when they hit it for download.

share|improve this answer
    
Thanks for your answer. I think I'll go with cookies. –  EyesX Apr 27 '11 at 14:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.