Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: Links that expire
10-30-2008, 02:23 PM #1
- Join Date
- Oct 2008
- Thanked 0 Times in 0 Posts
Links that expire
I will be putting PDF files on my server and I want to link each one through my site so when a user clicks their link, they start downloading the file. This part I can do.
The hard part for me is getting these links to expire 7 days after upload or after the user has downloaded it once.
Any ideas. I know PHP is used.
10-30-2008, 02:52 PM #2
- Join Date
- Oct 2007
- Springfield, IL
- Thanked 87 Times in 87 Posts
Either set a cookie on their machine, knowing they might just delete it, or have them log in to your system using PHP (or whatever you have) and set the time there. Then you just have them log in and check the date. You might want to ask this in the PHP forum.
...and gladly would he learn and gladly teach
Visit www.LiberalsWin.com for humor and the unique Bush/Obama Approval Polls
10-31-2008, 04:22 AM #3
Then when you pull these links out of the database to display them to the user, use a WHERE clause in your sql query that selects only active links. Depending on your application you will need to check the time also and update the active field accordingly.