24, July 2008

Expiring Links - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Expiring Links
« previous next »
Pages: [1] Print

Author Topic: Expiring Links  (Read 840 times)
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« on: Nov 16, 2006, 03: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.


Last blog : Marigondon Beach, Cebu, Philippines
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7974
40801 credits
Members referred : 3



« Reply #1 on: Nov 16, 2006, 08: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.)

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #2 on: Nov 16, 2006, 09: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, 09:13:07 AM by vbignacio »


Last blog : Marigondon Beach, Cebu, Philippines
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7974
40801 credits
Members referred : 3



« Reply #3 on: Nov 16, 2006, 09: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)

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #4 on: Nov 16, 2006, 09:16:40 AM »

no you dont understant. i dont want it to integrate with my payment processor.


Last blog : Marigondon Beach, Cebu, Philippines
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7974
40801 credits
Members referred : 3



« Reply #5 on: Nov 16, 2006, 09: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.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #6 on: Nov 16, 2006, 09:30:08 AM »

wht do you call that script so i can do a search on the net?


Last blog : Marigondon Beach, Cebu, Philippines
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7974
40801 credits
Members referred : 3



« Reply #7 on: Nov 16, 2006, 11:42:45 AM »

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.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #8 on: Nov 17, 2006, 04: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).


Last blog : Marigondon Beach, Cebu, Philippines
Pinoy Webmaster
.com pimp
*****
Gender: Male
Posts: 1126
6048 credits
Members referred : 0


Philippine Beaches


« Reply #9 on: Nov 17, 2006, 07:26:31 AM »

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!


« Last Edit: Nov 17, 2006, 07:46:34 AM by vbignacio »


Last blog : Marigondon Beach, Cebu, Philippines
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7974
40801 credits
Members referred : 3



« Reply #10 on: Nov 17, 2006, 01:43:37 PM »

Yeah that's not bad at all.

Keep working on it, and let us know your progress so we can help more Wink

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=4815
Tags : php databases browsers Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Expiring Links
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Jul 24, 2008, 11:19:42 AM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 35.712
Total Topics: 7.376
Total Members: 3.706
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: FortuneBeach

36 Guests, 4 Users online :

12 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.