vbignacio
Thu 16 November 2006, 02:11 am GMT +0100
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.
Nikolas
Thu 16 November 2006, 07:55 am GMT +0100
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.)
vbignacio
Thu 16 November 2006, 08:07 am GMT +0100
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.
Nikolas
Thu 16 November 2006, 08:10 am GMT +0100
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)
vbignacio
Thu 16 November 2006, 08:16 am GMT +0100
no you dont understant. i dont want it to integrate with my payment processor.
Nikolas
Thu 16 November 2006, 08:22 am GMT +0100
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.
vbignacio
Thu 16 November 2006, 08:30 am GMT +0100
wht do you call that script so i can do a search on the net?
Nikolas
Thu 16 November 2006, 10:42 am GMT +0100
I don't think you can find this script available somewhere, and especially for free.
You should code it, or hire someone to code it.
vbignacio
Fri 17 November 2006, 03:54 am GMT +0100
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).
vbignacio
Fri 17 November 2006, 06:26 am GMT +0100
hi, its me again. am i on the right track?
// create the MD5 hash
$secret_code = 'secret';
$formatted_date = (date("1 F d, Y"));
$hashed = md5("$secret_code $formatted_date");
thanks!
Nikolas
Fri 17 November 2006, 12:43 pm GMT +0100
Yeah that's not bad at all.
Keep working on it, and let us know your progress so we can help more ;)