ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Link that only works once

April 03, 2008 2:17pm

Subscribe [4]
  • #1 / Apr 03, 2008 2:17pm

    mschoening

    71 posts

    Hi,
    does anybody here have an idea how I could let EE generate a unique URL (that every user receives in an email after purchasing an item through the simple commerce module) which enables a one/or X-time download of a file on the server. After downloading the file once/X-times the link does not work anymore.

    Thanks,
    Max

  • #2 / Apr 03, 2008 2:43pm

    Mark Bowen

    12637 posts

    Hiya Max,

    You are going to need something like a secure download script. One that I use all the time in conjunction with EE is Linklok URL. I had to get the developers of the script to modify it ever so slightly so that the PHP file would work as an include from within EE templates but I literally have never found a better script than this one to use with EE and I must have tried over 50 of them when I was first looking for one. There are some free scripts out there but most of them have an admin area only where you have to input the file to download and then it creates the secure link for you which means that this wouldn’t be as easy to use with the Simple Commerce Module. Linklok has a link generation form but you don’t have to use this if you include the Linklok PHP file in an EE template.

    The way I use it is in conjunction with a great plugin that my learned Friend Andy (aka ExpressionEngineer) created. I’m sure if you asked him nicely he would let you have a copy of it although with the amount of people I have put in touch with him about this he really should start charging for it!! Andy if you are listening to this or come across it then I want some commission mate!! 😉

    So basically what you will have is a custom field that just holds the name of the file ie my-file-to-download.zip which is stored with each entry that you are using with the Simple Commerce Module.

    Once a person has successfully purchased an item using the Simple Commerce Module they can immediately go to a http://www.mysite.com/downloads/ area on your site and there will be a weblog tag surrounded by Andy’s plugin tag which basically spits out all weblog entries that you have paid for. In turn you then use Linklok which is a php file included in your EE template to create the secure links.

    May all sound a little convoluted but trust me it does work brilliantly as I have done this on a site which is selling many mp3 files and it works absolutely flawlessly. We keep on getting repeat orders because everyone who has purchased through the site has praised just how easy it was for them to use.

    Hope some of that throws some ideas your way?

    Best wishes,

    Mark

  • #3 / Apr 18, 2008 8:12pm

    Brad Street

    239 posts

    Hey Mark,

    I’ve seen you mention LinkLok several times, and I’m a previous user of the script and remember it being all that and then some. Is there any chance of getting you to post a tutorial for how to tie Simple Commerce, Linklok, Purchased plugin and whatever else is required together to provide seamless purchase/download/tracking functionality? If that’s too tall of an order, I certainly understand - but if it isn’t, I’m sure I’m not the only one who would find such a walk-through invaluable.

    Thanks,

    Brad

  • #4 / Apr 19, 2008 2:41pm

    Mark Bowen

    12637 posts

    Brad,

    As promised a quick write-up for you and anyone else so interested 😉

    Best wishes,

    Mark

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases