PHP License Script

Shadow121

Member
Messages
901
Reaction score
0
Points
16
I made a license script a while back and it was poorly done. It sent multiple requests to my server and it bogged it down. What would be a good way to make sure A) Someone is licensed and B) Not bog down the server?

I was thinking a cron job, but how would I check if it is setup?
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
1. Make them buy it from you.
2. Encrypt the files, as cPanel does, so that only you can edit them. This makes it closed source and means no one could develop for the platform unless you made an API to interface.
3. Make one callback to your server, during the installation of the script. This is what many scripts (IPB, vB, etc) do, however it doesn't work well, since people simply remove the callback.

The bottom line is that it's very hard to make a licensed script such as this.

WHMCS does a good job of it though, and I've actually never been able to get by them... They also have a team of dedicated servers handling the callbacks from the thousand of script-owners they have. Their system checks the license key, and also throws it back with the url it's licensed to. So if you're running the script somewhere other than the url it's licensed to, it blocks you out.
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,929
Reaction score
118
Points
63
SPBAS (SolidPHP Business Automation Suite) is a good software package that features a web store, client area, and licensing for php scripts (it even comes with a php class that you can plug right into your scripts!). Best of all, it's free for your first 5 clients, after which you will need to pay to continue accessing the admin area (although new clients will still be able to purchase your products).

It also integrates nicely with the ionCube PHP Encoder, which is a reasonably cheap encoder that protects the source code of your PHP scripts. If you plan on using SPBAS's licensing component, you would only need the Basic encoder (aka the cheapest one), so there's an extra benefit in that.

SPBAS reduces the traffic of callbacks by allowing you to configure how frequently it calls back. For example, you could have it set so that it dials home every two weeks to grab a temporary license file from your server that expires in 2 weeks, even if the main license doesn't expire or has a much longer expiration date.

Finally, SPBAS is currently running a deal in conjunction with ionCube where you can get a discount on the ionCube Basic encoder when purchasing it in conjunction with SPBAS.

You can read more about SPBAS at http://www.spbas.com and ionCube at http://www.ioncube.com

Note: I am recommending the above solution because that is what I am using for my scripts, and it seems to be working out well enough. There are obviously tons of other solutions and competing products that you may wish to check out as well before deciding on the above in order to get a better idea of what's out there and what solutions fit your needs the most.
 

Shadow121

Member
Messages
901
Reaction score
0
Points
16
Alright, thanks, I'll check out the links. I've known about IONCube but not enough money for it.
 
Top