| Redirect to created url that expires | |
|---|---|
| Tweet Topic Started: Mar 25 2009, 04:07 PM (305 Views) | |
| cincinnatiboy4867 | Mar 25 2009, 04:07 PM Post #1 |
|
DurkMusicBeats.com
|
Hey guys, I hope you can help me out with this: Is there a way to have a link that redirects to a created link that will expire? Here is my goal: Someone clicks add to cart(paypal) and purchase the beats for price. they then click return to seller and they are redirected to the download page that will expire in so many hours (probably 24). Hopefully someone can help me out with this so that you can't just post a link up on some site that has all my download links there. Thanks a lot
|
| DurkMusicBeats.com | |
![]() |
|
| Darksorrow131 | Mar 25 2009, 10:44 PM Post #2 |
|
I guess you could redirect to the download page with a GET parameter with the ID of the file to download; and the download page could itself deny access to the user if the ID was created more than 24 hrs ago. |
|
(let loop () (loop)) ((lambda (x) (x x)) (lambda (x) (x x))) (let ((k #f)) (call/cc (lambda (cc) (set! k cc)) (k)) ((call/cc call/cc) (call/cc call/cc)) -- Infinite loops are awesome! -- Tell me if you have other awesome infinite loops! | |
![]() |
|
| cincinnatiboy4867 | Mar 26 2009, 08:07 AM Post #3 |
|
DurkMusicBeats.com
|
What about when there are multiple items in the checkout. It would need to go to several different download pages... |
| DurkMusicBeats.com | |
![]() |
|
| Darksorrow131 | Mar 26 2009, 11:11 PM Post #4 |
|
You can always generate multiple links, like say if they bought items #577 and #1038, then you could give them links "/downloads?id=577" and "/downloads?id=1038" and add two entries to your database that says that user "blahblah" has purchased item 577 at (insert current time), and user "blahblah" has purchased item 1038 at (insert current time). When the user "blahblah" visits the URL "/downloads?id=577", look in the database for a record with user "blahblah" and item 577, and check that current time - the recorded time is < 24 hours. |
|
(let loop () (loop)) ((lambda (x) (x x)) (lambda (x) (x x))) (let ((k #f)) (call/cc (lambda (cc) (set! k cc)) (k)) ((call/cc call/cc) (call/cc call/cc)) -- Infinite loops are awesome! -- Tell me if you have other awesome infinite loops! | |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Web-Based Programming Support · Next Topic » |






10:18 AM Jul 11