Pinoy Webmaster
.com pimp
Gender:
Posts: 1126
6048 credits Members referred : 0
Philippine Beaches
« on: Nov 16, 2006, 02:11:41 am »
is it possible for a webpage to AUTOGENERATE a unique page url whenver it is accessed that EXPIRES after an hour so my users cant bookmark it and return to it afterwards.
i will be using it for my download page which is linked from my payment processor. it is currently using cookies to expire but i want something more reliable, like a php script.
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5779
46271 credits Members referred : 3
« Reply #1 on: Nov 16, 2006, 07:55:40 am »
I will try to give you a logic that does this with steps :
1) Customer places an order, which is saved as a new record to the database.
2) After the payment, paypal activates the order, and in that part an activation code is appended to the order record.
3) Customer gets an email which has the instructions and a URL to download the product which contains the activation code (eg. download.php?act=JAJNDHJ324
4) When the download completes the activation code is erased from the database - so the user wont be able to download the same thing many times.
This is an example with the simplest way to do this, as the best way to do it is much more difficult than this (client should be a user of the system, would be able to order more than one products, etc.)
Pinoy Webmaster
.com pimp
Gender:
Posts: 1126
6048 credits Members referred : 0
Philippine Beaches
« Reply #2 on: Nov 16, 2006, 08:07:26 am »
i want it to be independent and not relying on my payment processor. the webpage itself will generate a unique url when someone lands on it or from my processor, which it will also set to expire after an hour perhaps so when that user gets back to it or gives the link away, it cant.
« Last Edit: Nov 16, 2006, 08:13:07 am by vbignacio »
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5779
46271 credits Members referred : 3
« Reply #3 on: Nov 16, 2006, 08:10:12 am »
That is not really a problem.
Integrating it with the payment processor would make the job easier for you, but in anyway you can do it without that by creating the activation code and the welcome message to another part of site (an admin page that only you would be able to see)
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5779
46271 credits Members referred : 3
« Reply #5 on: Nov 16, 2006, 08:22:42 am »
As I said you can do it without integrating it with the payment processor.
The logic is to create an admin page where you will be able to create "tickets" with codes that will be used to download, and a download page where the users will put their activation code and download the product.
Pinoy Webmaster
.com pimp
Gender:
Posts: 1126
6048 credits Members referred : 0
Philippine Beaches
« Reply #8 on: Nov 17, 2006, 03:54:04 am »
yes, id like to code it myself. im venturing into the unknown world of php again.
how about some links to tutorials on MD5 hash and how i can generate an MD5 hash store in a php session (no file write required, browser session only).