How to limit the number of downloads?

8 replies
Hi,

I'm a "do it yourself" person. I'm an amateur at website programming.
I'm selling a limited product. I have set the download website and the download is working fine. My problem is that I don't how I will control the number of downloads.
Let's say I have a product limited to 100 customers, how can I change the download page to "sold out" page exactly when 100 people buy without me always checking?
It's probably very obvious to you, buy I googled many different keywords and found nothing on that subject.

Do you have any simple solution for this?

Thank you
#downloads #limit #number
  • Profile picture of the author patfl
    If every time you get a sale you store the transaction into a database, just count the number of transactions recorded at loading time and "close the store" when that number reaches 100.

    Hope it helps.

    Patrice
    {{ DiscussionBoard.errors[1202917].message }}
  • Profile picture of the author fifthnormal
    You could do something simpler, like having a PHP script write to a file on the server that stores the counter. That way you wouldn't need to have a database for it. It's a pretty simple job for someone who knows PHP.

    Daniel
    {{ DiscussionBoard.errors[1203700].message }}
  • Profile picture of the author HomeComputerGames
    Either way will work.
    Once you have the number of downloads in a variable a simple if statement will take care of the rest:
    if($mycount>=100){
    $myMessage='Sold Out';
    }else{
    $myMessage='<a href="yourdownload">';
    / could redirect to a thank you page before recording the count in case they do not download once on the page
    $mycount++;
    //update your counter document or field
    }

    PHP: file_get_contents - Manual
    PHP: fwrite - Manual
    Signature

    yes, I am....

    {{ DiscussionBoard.errors[1204062].message }}
  • Profile picture of the author willmartinapj
    that above option is flawed being that if they just refreshed the page you would lose your total sells. so regardless of which data storage option you decide to make sure you assign the user a special id.

    then if the id exist the data isn't updated. i would also add an option to limit the number of times the buyer can access the dl link as well
    {{ DiscussionBoard.errors[1204852].message }}
  • Profile picture of the author Ron Killian
    It would help to know what you are using to sell the product in the first place. Is it a pre-made script, or your own? What language?

    One option, the 7dollarscrets script can limit downloads and it's very inexpensive. I use to be hands on myself for many years, till I learned I can save ALL kinds of time and frustration by buying something that is ready to go.

    Not to mention, I don't have much hair left to pull out

    Just a thought.
    Signature
    PLR Affiliate Program Has Launched! Easily Promote Over 5,000 PLR and MRR Products.

    Largest Selection of PLR Articles on the Planet! PLR Ebooks, PLR Video, PLR Websites and more with Private Label Rights
    {{ DiscussionBoard.errors[1205234].message }}
    • Profile picture of the author Matt D.
      I use paydotcom.com Paypal based. I have no idea what they use. I know very little of programming language.

      Actually what would also do, is that when I'd reach 100 buyers, my link would change, so instead of going to the sales page it would go to "sold out" sales page or just not be linkable.

      If I bought the scripts I probably wouldn't know how to implement them.

      Thank you
      Signature
      Hard work always pays off.
      {{ DiscussionBoard.errors[1206325].message }}
  • Profile picture of the author Marcel Hartmann
    If you're using PayPal, you'd have to code a script with their API in mind. with merchants as well. Pay somebody $30 on RentACoder to do this for you. It wouldn't be too hard (you can use URL properties and a PHP referrer check on the confirmation page to aggregate a number up to the point where it's 100, at which point the sales page would change), but is $30 really worth 10 hours of headaches?
    {{ DiscussionBoard.errors[1206442].message }}
  • Profile picture of the author warrich
    you have to use db to count, or contact me i will make a custom script for this.
    {{ DiscussionBoard.errors[1207508].message }}

Trending Topics