How do websites like this work???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
KyZu
Forum Newbie
Posts: 17
Joined: Sun Apr 24, 2011 9:13 pm

How do websites like this work???

Post by KyZu »

Here's a random example:
macbundlebox.com/the-spring-bundle/ (I purposely excluded the http://www. so people won't think this is spam)

Notice how there are 11 apps listed? So suppose someone buys the package, I'm assuming they get emailed a unique license/activation code to activate that particular software? Or they get a link to download the software? Or they email each customer a unique username/password to download that software.

I am not a PHP guru but I am almost certain that this is done in php and works in one of 3 ways:

- Either the app developers give a giant list of licenses that are assigned by the webmaster per purchase
- A URL is pinged after each purchase which sends a license back and is directly emailed to the customer
- A URL is pinged and the app developers send the license to the customer

So my question is...seeing as how most of you are very knowledgeable in PHP, is there any client management/billing software that you know of that could accomplish the above, and be easily managed by a non-PHP guru? If not, how much would it cost (give or take) to build something that accomplishes the above?
ramblin54321
Forum Commoner
Posts: 32
Joined: Wed Nov 18, 2009 5:31 am

Re: How do websites like this work???

Post by ramblin54321 »

check out ioncube.com and zen-cart.com
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: How do websites like this work???

Post by superdezign »

It's a fairly simple thing to do on your own. If you allow offline validation of your software, then you need a specific means of generating activation codes that your software will accept. This prevents people from entering random invalid codes and them being considered valid. However, if you require online validation, you can generate any activation code and then store it in a database table with the columns `activation_code` and `is_active`. When it is generated, `is_active` is false. When they attempt to activate, you checks if the code they are using exists and has `is_active` equal to false. If so, set `is_active` to true and consider their software active. The software would determine this by using the online response to edit registry keys (though, there are much more secure methods to activate software), or check online every time the software is opened.
KyZu
Forum Newbie
Posts: 17
Joined: Sun Apr 24, 2011 9:13 pm

Re: How do websites like this work???

Post by KyZu »

superdezign wrote:It's a fairly simple thing to do on your own. If you allow offline validation of your software, then you need a specific means of generating activation codes that your software will accept. This prevents people from entering random invalid codes and them being considered valid. However, if you require online validation, you can generate any activation code and then store it in a database table with the columns `activation_code` and `is_active`. When it is generated, `is_active` is false. When they attempt to activate, you checks if the code they are using exists and has `is_active` equal to false. If so, set `is_active` to true and consider their software active. The software would determine this by using the online response to edit registry keys (though, there are much more secure methods to activate software), or check online every time the software is opened.
Great suggestion superdezign, in this case however the software is not mine, it's from other vendors.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: How do websites like this work???

Post by superdezign »

Do the vendors provide you with license keys? You could use those keys instead of generating new ones.
KyZu
Forum Newbie
Posts: 17
Joined: Sun Apr 24, 2011 9:13 pm

Re: How do websites like this work???

Post by KyZu »

superdezign wrote:Do the vendors provide you with license keys? You could use those keys instead of generating new ones.
Yes.

Since I'm not a PHP coder, does it make sense what I said in my original post? That "A URL is pinged and the app developers send the license to the customer", things like that?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: How do websites like this work???

Post by superdezign »

So what you are saying is that they don't give you the keys ahead of time, but you have to query their server for the key? If so, you just need to run an HTTP request using either cURL or file_get_contents() and then pull the key from the response.
KyZu
Forum Newbie
Posts: 17
Joined: Sun Apr 24, 2011 9:13 pm

Re: How do websites like this work???

Post by KyZu »

Exactly, it would work either way.

Do you know of any client management/billing software that could do that?
Post Reply