Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Issue a license key for a wordpress plugin? (https://www.warriorforum.com/programming/306157-issue-license-key-wordpress-plugin.html)

ProEFI 26th December 2010 09:22 PM

Issue a license key for a wordpress plugin?
 
I'm having a Wordpress plugin developed and I would like to issue a license key to each user/purchaser of the plugin that will allow them to use it on unlimited domains. Can someone refer me to an information source to learn more on how to do this?

Thanks
Andrew

ereadergold 27th December 2010 01:46 PM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by h_al (Post 3078161)
You need to do the programming yourself I guess. Hire a coder.

Now there's a flash of brilliance! Good luck with the post count building efforts!:rolleyes:

Now seriously, to answer your question:

I recently designed a WP plugin that did the exact same thing - it issues an API key and user ID to a user after they pay with ClickBank or PayPal.

In my case I did it with the information sent to me by ClickBank or PayPal, I built an IPN "listener" that received the transaction details. I then use a piece of code that essentially creates an API key (a random unique string with some rules regarding formatting). the API key is stored in the user table, along with the user ID (I used the users e-mail address from the CB/PayPal transaction as the ID). I also mail the key to the user.

On every call to the API I have the user ID and API key included (the Plugin Dashboard has fields to enter this data). If they validate then the user is permitted to make the API call, otherwise it fails.

Hope this is of some use to you, please feel free to contact me if you want any more details - always happy to help a fellow Canadian (actually, I'm always happy to help a fellow Warrior, no matter what nationality)!

Happy Holidays

Bill

ProEFI 27th December 2010 10:36 PM

Re: Issue a license key for a wordpress plugin?
 
Hi Bill,
Thanks so much for the reply. It definitely helps me to better understand what needs to be done. However, it's definitely above my skill level.
I'm using Wishlist Member too so I'm sure that will add another level of complexity.

Andrew

ereadergold 28th December 2010 01:41 AM

Re: Issue a license key for a wordpress plugin?
 
Hi Andrew

Actually I don't think WishList will add to the complexity, although I'd have to know a bit more about what you are trying to accomplish before I could say that with authority.

Bottom line is that you need a method of managing and validating keys. The method I described above is one way, no doubt there are countless others. Without knowing what your plugin actually does (and I understand if its a secret) makes it difficult to recommend the best method.

As you said you are having the plugin "developed" I assume you are working with a developer? No doubt he/she could offer a suggestion about the best way to accomplish this for your particular plugin design.

Best of luck with your plugin!

Bill

apexNSW 28th December 2010 09:43 AM

Re: Issue a license key for a wordpress plugin?
 
Hello Andrew,

I am currently developing a plugin and I have come across some of these same questions myself. If your plugin doesn't have to make a call-back to your server to operate, you may just want to encode your completed script. You can "compile" your code with a license key that has to be entered by the end-user. I am planning on using CodeLock because it is way cheaper than other competing software. (FYI: It is POSSIBLE to reverse engineer the encoding done by this program and other software like it, but it isn't necessarily easy!) Anyway, I am still in the development phase, but this is what I am planning to use myself.

Best of luck,
Nick

xrvel 31st December 2010 02:10 PM

Re: Issue a license key for a wordpress plugin?
 
While i was trying to put license system into my plugin, my suggestion are :
- callback to your server is a must (to check key, etc)
- source code encryption is a must (my suggestion : ioncube -- although nothing is 100% perfect, i heard ioncube can be decoded)

Tim Franklin 31st December 2010 06:04 PM

Re: Issue a license key for a wordpress plugin?
 
I have developed a custom script that does this however it is still in development, I can tell you a few things about this process, it is not as easy as it sounds, and you may encounter issues, that could cause you to pull your hair out, I am still working on this and eventually I will release the script however, one of the biggest problems that I keep encountering is the rapid development cycle of word-press,

3.0 3.01 3.02 3.03 3.04, one or more could end up breaking your code so you have to go back and try again, it is a real pain in the butt, trying to find the best balance between what works and what works best, now that is the real challenge.

Revolves 31st December 2010 11:04 PM

Re: Issue a license key for a wordpress plugin?
 
mywebwork's solution will work if your plugin has to communicate with your server to get the job done, something like Askimet. However, if it's self-sufficient, then an API key won't be of any use.

As far as encoding the source code of the plugin is concerned, I'm not sure if it'd provide any additional security. WordPress plugins have to be GPL, and anyone can request the full source to it (as per GPL).

If your plugin is good enough, then the good guys won't share it with others. And the pirates will always be pirating stuff. You can't help it. Rather, put additional efforts into satisfying your loyal customers.

Regards,
Revolves

ereadergold 1st January 2011 03:55 AM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by Revolves (Post 3102920)
mywebwork's solution will work if your plugin has to communicate with your server to get the job done, something like Askimet. However, if it's self-sufficient, then an API key won't be of any use.

Yes, the design I created was indeed for a plugin that depended upon an API for its operation. However the same concept could also be used for a "self-sufficient" plugin.

Even if the plugin didn't require an API you could still have it "call home" with a username and activation key. It would actually have several advantages:

- You could keep track of the number of sites that have the plugin installed, and restrict that number if required.
- You could deactivate plugins that use keys that were stolen or illegally distributed.
- If you wanted to you could even capture usage statistics, which may be useful for marketing purposes.

Again there are a number of possible solutions, this is only one of them.

Happy New Year everyone!

Bill

Revolves 1st January 2011 07:06 AM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by mywebwork (Post 3103443)
Yes, the design I created was indeed for a plugin that depended upon an API for its operation. However the same concept could also be used for a "self-sufficient" plugin.

Even if the plugin didn't require an API you could still have it "call home" with a username and activation key. It would actually have several advantages:

- You could keep track of the number of sites that have the plugin installed, and restrict that number if required.
- You could deactivate plugins that use keys that were stolen or illegally distributed.
- If you wanted to you could even capture usage statistics, which may be useful for marketing purposes.

Again there are a number of possible solutions, this is only one of them.

Happy New Year everyone!

Bill

Happy New Year!

You're right. API keys can also be used with "self-sufficient" plugins. However, you'll then also have to encode your plugin. Or else, people can just remove the checks from the plugin's source.

But then, I start thinking whether it's worth the effort, all just keep the pirates away, who'll keep on pirating no matter what. We can simply concentrate on the customers who have honestly bought the product.

However, the situation is different when it comes to "non self-sufficient" plugins, as was your case. That's because you don't want pirates feeding on your bandwidth. In that case, it's always good to have an API key.

Regards,
Revolves

apexNSW 2nd January 2011 09:49 AM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by Revolves (Post 3102920)
As far as encoding the source code of the plugin is concerned, I'm not sure if it'd provide any additional security. WordPress plugins have to be GPL, and anyone can request the full source to it (as per GPL).

I do not believe that all plugins have to be GPL compatible. The plugin I am currently developing is not. I have read a variety of information on the subject and I think it is widely misinterpreted.

Here is one opinion: Why They’re Wrong: WordPress Plugins Shouldn’t Have to be GPL

Just food for thought.

phpbbxpert 2nd January 2011 03:18 PM

Re: Issue a license key for a wordpress plugin?
 
The whole GLP spec is quite touchy on how you can/can not have a different license for a plug-in.

Frequently Asked Questions about the GNU Licenses - GNU Project - Free Software Foundation (FSF)
Basically if you use functions from WordPress it has to be GLP.

This is pointed at themes, but it is a similar concept.
http://wordpress.org/news/2009/07/themes-are-gpl-too/

andreasnrb 3rd January 2011 04:04 PM

Re: Issue a license key for a wordpress plugin?
 
phpbbxpert: GPL for WP is a grayarea. WordPress Core Devs and Matt have their view on the subject but its not universal. All pro WP GPL is biased in the WP world. But its basically all gray when it comes to PHP since the GPLv2 wasnt written for dynamic stuff, linking etc.
And we don't know until its tried in court until then we are all bull****ting.

mrmagos 3rd January 2011 08:12 PM

Re: Issue a license key for a wordpress plugin?
 
I thought the whole themes-and-plugins-are-GPL had been resolved some time ago. Since themes and plugins run under the same process and use the same hooks as the core software, then they are considered to be derivative works and therefore subject to GPL. However, any css, javacript or images (and other non-PHP parts) bundled with said plugin or theme are not subject to GPL, provided those components themselves are not derived from GPL code. Therefore, the PHP portions are most definitely GPL, though you can 'sell' the other parts. You could even release the entirety as GPL, but place it behind a paywall and 'sell' support and updates.

Tim Franklin 3rd January 2011 08:24 PM

Re: Issue a license key for a wordpress plugin?
 
Well, one thing for sure everyone has an opinion, on this however, legally, one entity cannot take away the legal rights of another entity.

In other words If I create a plugin, and it contains my personal intellectual property which I can also copyright, by the way as well as apply for a patent, if I wanted, why bother, right.

So just because my plug-in touches word-press does not give word-press rights to my intellectual property see how that works, if this were in fact legal then wordpress could claim the rights to all server software where it runs including Cpanel,

Does that make sense? No, it does not, why, simply because just because wordpress runs on Cpanel does not mean that Cpanel is now GPL, that would be like trying to sell ice to an Eskimo no offense to the Eskimos.

Wanting something does not make it true, The biggest problem here is that most people here have never bothered to read the GPL, mostly because it is totally confusing unless you have a law background and even then its full of conversant facts,

But none of that matters, because, unless and until some case law is developed in this area, the final word is yet to come out, in other words the fat lady has not sung yet.

I think that intellectual property and the GPL are capable of playing well together, but they are not going to be having sex or children any time soon.

russjam 23rd February 2011 06:42 AM

Re: Issue a license key for a wordpress plugin?
 
I implemented a similar approach to the premium plugin, Gravity Forms, in my own plugin, Slickr Flickr. I came up with the solution by inspecting their code.

I addressed the GPL and licensing issues as follow

1) Plugin is GPL and non encoded

2) Plugin has free version

3) Premium version comes with support and access to membership forum as well as bonus features that are unlocked with the license key

4) When someone buys the system generate a random 32 character key that has a few decillion possible unique values, sets up a membership account and emails them the login so they can log in and get their license key

5) Member enters their license key in the plugin's admin settings

6) Custom validation makes remote call to check license key is valid - a green tick is placed alongside the key if it is valid and a red cross if it is invalid

7) Whenever, the plugins page is visited, and the 12 hour cache has expired, a remote license check is made: I collect referrer information so I know on how many domains the license is being used - I could add more restrictions in the license validator but do not need to yet as nobody is taking the mickey


Because the code is GPL anyone can take it and remove the license checking if they wanted to so the security will not deter anyone with a little bit of time and determination who does not want to pay me for my work. This approach makes sense for me as the plugin is cheap so it is not worth spending a lot of time and effort to protect it.

However, I would go down the IonCube encryption route if you need to protect the code better. This can still be GPL as long as you offer to give anyone a copy of the unencrypted code to anyone who asks for it. (That's the rules). However you can send them a printout of the code by post so it you think the requestor has mal intent you can make it a little more difficult for them.

If you require more protection, then you can move some of the code on to a server and implement the plugin as a client/server implementation. Here you protect your IPR by hosting the key components on your own server while the client part of the plugin is GNU Lesser General Public License. Matt Mullenweg's own Akismet plugin is an example of the client/server approach

If you would like the random license key generator code just PM me.

Evan-M 23rd February 2011 07:15 AM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by apexNSW (Post 3084388)
Hello Andrew,

I am currently developing a plugin and I have come across some of these same questions myself. If your plugin doesn't have to make a call-back to your server to operate, you may just want to encode your completed script. You can "compile" your code with a license key that has to be entered by the end-user. I am planning on using CodeLock because it is way cheaper than other competing software. (FYI: It is POSSIBLE to reverse engineer the encoding done by this program and other software like it, but it isn't necessarily easy!) Anyway, I am still in the development phase, but this is what I am planning to use myself.

Best of luck,
Nick


It is easy, there is another program called "codelock Decoder" you run any codelock program through it, and it outputs a decoded version ( doesn't get much easier actually) just a heads up.

http://www.google.com/search?sourcei...delock+decoder

Istvan Horvath 23rd February 2011 09:10 AM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by russjam (Post 3415570)
I implemented a similar approach to the premium plugin, Gravity Forms, in my own plugin, Slickr Flickr. I came up with the solution by inspecting their code.

I addressed the GPL and licensing issues as follow

1) Plugin is GPL and non encoded

2) Plugin has free version

3) Premium version comes with support and access to membership forum as well as bonus features that are unlocked with the license key

4) When someone buys the system generate a random 32 character key that has a few decillion possible unique values, sets up a membership account and emails them the login so they can log in and get their license key

5) Member enters their license key in the plugin's admin settings

6) Custom validation makes remote call to check license key is valid - a green tick is placed alongside the key if it is valid and a red cross if it is invalid

7) Whenever, the plugins page is visited, and the 12 hour cache has expired, a remote license check is made: I collect referrer information so I know on how many domains the license is being used - I could add more restrictions in the license validator but do not need to yet as nobody is taking the mickey

[...]

Congratulations!

This is the most common sense post ever in the WF regarding WP, GPL, themes and plugins.

Everyone else talking about WP/GPL/plugins - they are just pushing their own personal agenda without ever having a convincing argument... (sorry, guys) and showing often times lack of fundamental knowledge in this field.

P.S. I don't make plugins, LOL

wayfarer 23rd February 2011 10:02 AM

Re: Issue a license key for a wordpress plugin?
 
Yep, as long as you keep the plugin GPL (or compatible licenses like MIT or BSD) it will be legal. I think people understand you're paying for support, which is fine. Just don't encrypt it.

wayfarer 23rd February 2011 10:07 AM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by Tim Franklin (Post 3116334)
So just because my plug-in touches word-press does not give word-press rights to my intellectual property see how that works, if this were in fact legal then wordpress could claim the rights to all server software where it runs including Cpanel

Wordpress doesn't use any of Cpanel's functions, or use any of its APIs, etc. When you make a Wordpress plugin, you're using Wordpress's functions to build it. If you don't, it won't be a Wordpress plugin. Just by doing this you are subject to its license, and cannot break the terms of the GPL. If you release it in an incompatible license, you are breaking the law and can be subject to damages in a court of law.

This doesn't mean you can't sell plugins. As pointed out above, customers are paying for support.

SteveJohnson 23rd February 2011 11:25 PM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by wayfarer (Post 3416494)
... Just by doing this you are subject to its license, and cannot break the terms of the GPL. If you release it in an incompatible license, you are breaking the law and can be subject to damages in a court of law. ...

While IANAL, you'd not be 'breaking the law' -- even if the terms of the GPL are in fact enforceable, which no one really knows because there haven't been any court cases concerning it yet -- and if you were to be sued over it, you'd end up in civil court, not criminal court.

wayfarer 24th February 2011 06:54 AM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by SteveJohnson (Post 3420326)
While IANAL, you'd not be 'breaking the law' -- even if the terms of the GPL are in fact enforceable, which no one really knows because there haven't been any court cases concerning it yet -- and if you were to be sued over it, you'd end up in civil court, not criminal court.

That's not true, there's been lots of court cases where the GPL side won out, just none about this particular case (building plugins to a popular GPL application).

Here's a list of GPL cases, in the EU and the US:

FST vs Cisco
Skype loses GPL lawsuit in Germany
US Busybox GPL Lawsuits
4 lawsuits won by GPL side (including Busybox)

Usually open source cases are settled by a letter, without ever going to court, but as you can see, there have been a few cases. The FST (Free Software Foundation) is usually the one to file suit. I haven't found any cases where the GPL side didn't win.

The question of plugins is basically going to come down to whether the plugin is a derivative work. If so, going against the license is a copyright violation. No one is saying you're going to end up in criminal court.

intenseblog 6th April 2011 06:48 AM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by Skylr (Post 3101414)
I too have a WP plugin that I want to charge for and also PROTECT.

I like the way Optimize Press has a license code system in place to protect their theme from being shared.

Has anyone see purchased it and seen how they do things?

You need to put the domain names of the sites you plan on using the theme on into a place on their site/server (??) and then it automatically displays a license code you need to enter into the dashboard of the site where you want the theme to activate it.

i would like to do the same thing for my plugin.

Anyone know if there is anything out there like that? Or would I have to hire a coder myself?

Thanks!

Sky

Instead of issue a license key like that why don't you allow your customers provide their WP address on your server and then, at the customers' website, your plugin will send out their address to your server to check the license?

But it's not a real problem, by "calling home" each time your plugin used, your server will comsume a lot of bandwidth and also slow down your customers' websites, a solution for this is storing and retrieving a local license variable, but all of them will easily be bypassed if you don't encrypt the code :(

xrvel 6th April 2011 11:13 PM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by intenseblog (Post 3659766)
But it's not a real problem, by "calling home" each time your plugin used, your server will comsume a lot of bandwidth and also slow down your customers' websites, a solution for this is storing and retrieving a local license variable, but all of them will easily be bypassed if you don't encrypt the code :(

Then dont always call. Do it for example with 1% chance of each visitor visit.
So every 100 visitors, 1 call.

jminkler 7th April 2011 01:26 PM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by Tim Franklin (Post 3116334)
Well, one thing for sure everyone has an opinion, on this however, legally, one entity cannot take away the legal rights of another entity.

In other words If I create a plugin, and it contains my personal intellectual property which I can also copyright, by the way as well as apply for a patent, if I wanted, why bother, right.

So just because my plug-in touches word-press does not give word-press rights to my intellectual property see how that works, if this were in fact legal then wordpress could claim the rights to all server software where it runs including Cpanel,

Does that make sense? No, it does not, why, simply because just because wordpress runs on Cpanel does not mean that Cpanel is now GPL, that would be like trying to sell ice to an Eskimo no offense to the Eskimos.

Wanting something does not make it true, The biggest problem here is that most people here have never bothered to read the GPL, mostly because it is totally confusing unless you have a law background and even then its full of conversant facts,

But none of that matters, because, unless and until some case law is developed in this area, the final word is yet to come out, in other words the fat lady has not sung yet.

I think that intellectual property and the GPL are capable of playing well together, but they are not going to be having sex or children any time soon.

These arguments make no sense

Tim Franklin 7th April 2011 01:40 PM

Re: Issue a license key for a wordpress plugin?
 
Actually it makes perfect sense, from a purely ideological perspective, as Robin Williams once said during a standup comedy routine, (for those of you on Quaaludes) this is a disargeement between copyright, Intellectual rights advocates, and copyleft Socialized Code advocates, as mentioned previously there is no case law to support one position over another, (before you go there, read, when a case is settled, it does not mean case law has been created) additionally, when hardware is represented it is a totally different aspect of software, so the position some mentioned in some threads are not properly mounted in terms of argument.

Since hardware, cannot be distributed with a on demand GPL version,
(which by the way does not include IP rights to any code generated in a plugin)

Additionally, a copy of wordpress can be pointed to as a link and satisfy any GPL reguirements, along with a base statement, (which means that if you demand access to code from thesis or any other for hire, code) you will be laughed out of their email box.

Still, I remain unconvinced that the copy left theory of ordained law is accurate at all.

If wordpress continues down this path there will be consequences, likely not now and probably not in the near future, but in the tired but truthful analogy

Cant we all just get along,)

If PHP is BSD (like) and Wordpress wants to be GPL, fine, but you cannot makes reckless statements about how one license trumps another simply because they work together.

LAMP is quite different in its license terms.

again for those on
Quaaludes different strokes for different folks.

ProEFI 9th April 2011 02:30 PM

Re: Issue a license key for a wordpress plugin?
 
As the OP, I'm still looking for a solution for a licensing key for a plugin. If anyone knows how to set this up and is looking to take this project on please PM me.

Thanks
Andrew

AzzamS 1st May 2011 03:22 PM

Re: Issue a license key for a wordpress plugin?
 
Any solution to this problem since I need to use something for a theme.
My coder is thinking of including this:

class-jfile-php at class.jfile.php - Free PHP Code

But it does not offer an automated process of providing a licence key upon payment.

I am chatting with him now to work on a solution, if i find something then I will be back here to provide a solution

spamfighter 5th May 2011 07:58 AM

Re: Issue a license key for a wordpress plugin?
 
Generally speaking, you would probably want to use encrypted php code if you provide license keys.
Otherwise customers can just remove the routine to check the key.

For encryption I'd suggest: IonCube
For offering license Keys and provide an order and accounting system, I would suggest: WHMCS + Licensing Addon

Or SPBAS, which is a little harder in handling IMHO

wayfarer 5th May 2011 08:38 AM

Re: Issue a license key for a wordpress plugin?
 
The problem with encrypting source code is that anyone who's not an idiot and knows the slightest thing about programming, can unencrypt it. The people who don't know anything about programming are not going to know what to do with your code anyway.

Mark Ford 5th May 2011 03:42 PM

Re: Issue a license key for a wordpress plugin?
 
Quote:

The problem with encrypting source code is that anyone who's not an idiot and knows the slightest thing about programming, can unencrypt it
Good luck with that on Ioncube - I know a few developers who tried and failed miserably to unencrypt - and I have been caught with it once - encrypted a file and somehow managed to misplace the source file. :D

Quote:

For encryption I'd suggest: IonCube
Ioncube is what we use, Pro and Cerberus versions provide PHP encoding plus the abililty to create license files for your products. License files can protect your scripts against unauthorised use by locking to specific machines. They can also time expire, which is ideal for releasing evaluation versions. The Windows Pro or Cerberus Encoder also comes with a license generator for Linux, which is useful for automating license generation from a web server.

spamfighter 6th May 2011 01:49 AM

Re: Issue a license key for a wordpress plugin?
 
Quote:

and I have been caught with it once - encrypted a file and somehow managed to misplace the source file.
Yeah these things happen hehe...
Not much you can do than trying to recall the code and write it again lol...

Since it happened to me as well, I figured using DVDs to archive unencrypted code is not a bad idea :D

Tim Franklin 6th May 2011 07:03 AM

Re: Issue a license key for a wordpress plugin?
 
Interesting looks like they even have an x86 MAC OSX version but the pricetag is 379.00 seems like a lot of hoops to go through, to get to a place where you could protect your source code, I guess though considering the bleeding alternatives, share sites, and other venues, you just about have to consider that if you do not take any steps then your product life will be short.

Quote:

Originally Posted by Mark Ford (Post 3832866)
Good luck with that on Ioncube - I know a few developers who tried and failed miserably to unencrypt - and I have been caught with it once - encrypted a file and somehow managed to misplace the source file. :D



Ioncube is what we use, Pro and Cerberus versions provide PHP encoding plus the abililty to create license files for your products. License files can protect your scripts against unauthorised use by locking to specific machines. They can also time expire, which is ideal for releasing evaluation versions. The Windows Pro or Cerberus Encoder also comes with a license generator for Linux, which is useful for automating license generation from a web server.


wayfarer 6th May 2011 12:51 PM

Re: Issue a license key for a wordpress plugin?
 
Ioncube needs its own interpreter installed on the host though, doesn't it? Sort of like the Zend Optimizer? That seems it makes distribution more difficult to me. I don't know why most people are so worried about their source code anyway. Consumers are paying for support, not for products to steal.

If you're selling to a very specific industry that is willing to install whatever you require in order to run your product, I understand, however.

spamfighter 6th May 2011 01:38 PM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Consumers are paying for support, not for products to steal.
This might be true, but what about nosy competitors, or customers who change the source and ask you for support telling you "I didn't change anything" :)

wayfarer 6th May 2011 01:42 PM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by spamfighter (Post 3838238)
This might be true, but what about nosy competitors, or customers who change the source and ask you for support telling you "I didn't change anything" :)

Referring to the customers who change the source code, then ask for support: have you ever had major problems with that? Seems like a relatively rare occurrence, though it would be annoying if it happened.

Nosy competitors I understand, but does that outweigh the distribution problems faced by requiring a third-party interpreter to read encrypted code? I guess you'd just have to weigh each situation individually. If you're going for as widespread of distribution as possible, I'd have to say no.

majick 17th May 2011 07:38 PM

Re: Issue a license key for a wordpress plugin?
 
A different approach might be using a members area for customers and having the script verify active members via another script in the members area. This saves having to come up with license keys etc, let's you track which domains are being used by which members and members are less likely to share their login information.
Then obfuscate the PHP code with POBS. :-)

solaceten 6th August 2011 05:37 PM

Re: Issue a license key for a wordpress plugin?
 
Hello I am also looking for a licensing option for a premium wordpress plugin and wondered if anyone had any suggestions.

The best solution I have found is through using WHMCS licensing addon, but that is a bit overkill for my needs as I don't need the WHMCS application (which is typicaly used by webhosts / domain name registrars to automate billing etc)

So, any suggestions ?
Thanks

Harrison_Uhl 13th August 2011 11:17 AM

Re: Issue a license key for a wordpress plugin?
 
AFAIK a 'derivative work' for GPL purposes is one that starts with GPL source code, and modifies that source code. A plugin need only access functionality exposed by the GPL code. Most often the functionality accessed is simply to tell Wordpress when to call back the plugin to perform the plugin's functions.

This is essentially similar to any program utilizing the API's (Application Program Interface) of Linux itself. The notion that API usage would 'contaminate' code and force it to become GPL was the basis for M$'s claims that anything that touched Linux would become GPL.

As I recall, this led to a distinction between 'utilizing' (via an API or otherwise) functionality exposed by GPL code VERSUS 'incorporating' GPL code, where 'utilizing' was not sufficient to force GPL licensing.

If I remember correctly, one of M$'s arguments was that if someone ran a GPL program on Windows, this would force Windows to become GPL. This was the basis for all sorts of anti-GPL activity. I think the matter resolved with some statement from the OSF that said that was not the intent of the GPL.

Regarding 'securing' a theme or plugin
Anything on a computer under a user's control can eventually be taken apart, and modified to ignore usage (i.e. license) restrictions. The only solution is to keep some of the functionality on computers never under the user's control. For a theme this might be a gui designer that runs on the vendor's computer. For a plugin, it might be fresh data, or providing a gateway to another service.

Security conscious system admins are skeptical about code from unknown sources that cannot be inspected. Encrypting your first plugin will make your marketing effort more up hill. (Also, I don't think you can get an encrypted theme or plugin listed in the Wordpress.org directory.)

Harrison

RobKonrad 29th August 2011 07:16 PM

Re: Issue a license key for a wordpress plugin?
 
Hello everyone,

followed the initial discussion with great interest, being about to release my first commercial WP plugin.

My question to all the people who already invested time into this:

Any chance to "buy into" your development? I guess it doesn't make much sense to start from scratch if others invested time and/or money into this - so if anyone is willing to share, I'd be happy to compensate accordingly.

Cheers,
Rob

Gama Seva 31st August 2011 09:44 PM

Re: Issue a license key for a wordpress plugin?
 
I've been researching this licensing stuff for a while for my project and I found out that there's nothing really an all-in-one off-the-shelves solution to protect your php scripts. You have to jump through a lot of hoops and spend a lot of money before you can get a solution.

Here's my recommendations:

1. If you are routing for software development for long term then I advice you to spend money for the development of your in house licensing solution.

2. If you want an off-the-shelves solution then you may try "SPBAS". It's an expensive one but it's a great solution, it's not fully automatic but with a little bit of programming knowledge you can easily automate the process.

3. If you need a low-end solution that works then try "PHPLicengine" + "ionCube". These 2 software can do the trick plus you can install it on your own server to control all your software and issue unlimited licenses without paying subscription.

Hope this helps.

Gama

andreasnrb 1st September 2011 03:50 AM

Re: Issue a license key for a wordpress plugin?
 
I got a working WordPress system with registration, license keys, automatic updates etc. Are there any interest in releasing it as a standalone package?

stcupp 5th September 2011 01:50 PM

Re: Issue a license key for a wordpress plugin?
 
just so you know any licenseing done through php is extremely easy to crack unless the php is obfuscated and even then then license keys are very easy to crack id say if someone posts it on some reverse engineering forums theyd have it cracked in about a hour

rufaswan 6th September 2011 07:04 AM

Re: Issue a license key for a wordpress plugin?
 
To OP,

The way I envision would look something like this:

First, you'll need a script. This script needs to connect to the database.

When someone makes a purchase, your download page will make a calling to this script.

The script will check for the transaction details and then generates a license key.

The key will then updated into the database and finally displayed on the download page.

After the buyer uploaded the plugin, he/she will needs to activate it.

To activate, the buyer will need to enter their license key, and the info will be post to the script (on your server).

The script will query the database and check if the license key is valid. If yes, return the unlock key to its referrer. The plugin is now unlocked.

As you can see, the script itself consist of a lot of sensitive information, such as your database password, your Paypal/Clickbank API token, the secret algorithm to generate the license key and unlock key... For security reason, most people will prefer to develop the script in-house. It needs to be customized anyway.

- Rufas

jaybaker 7th September 2011 08:28 PM

Re: Issue a license key for a wordpress plugin?
 
Not sure on the cross domain connect to the db but you should be able to set the license key up using something like so to generate and store in the db.
Code:

if key is xxx-xxxx-xx-xxxx

 = rand(100,999);
 = rand(1000,9999);
and so on.
then pull them together with dashes and store in db.
=.'-'.....
email off to customer


lordspace 17th September 2011 03:36 AM

Re: Issue a license key for a wordpress plugin?
 
I've done a similar licensing solution but I dropped it because I release my software as open source. It did indeed called *home* and cached the result/encrypted for 4hours.

By the way ioncube has an online version of its encoder. It is much cheaper.
It works on some kind of credits system and you are charged based on the complexity of your code.

xrvel 18th September 2011 11:07 AM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by lordspace (Post 4695963)
I've done a similar licensing solution but I dropped it because I release my software as open source. It did indeed called *home* and cached the result/encrypted for 4hours.

By the way ioncube has an online version of its encoder. It is much cheaper.
It works on some kind of credits system and you are charged based on the complexity of your code.

Ioncube online encoder is definitely cheap but you can not use it 100% as final solution on licensing. It only encodes.

Except for the not-online encoder, i heard it can lock a script to specific domain. Well, you have to ask what domain will the buyer use and encode a script every time there is a buyer. (am i right?)

mitoshthewarrior 21st September 2011 02:26 PM

Re: Issue a license key for a wordpress plugin?
 
Quote:

Originally Posted by russjam (Post 3415570)
I implemented a similar approach to the premium plugin, Gravity Forms, in my own plugin, Slickr Flickr. I came up with the solution by inspecting their code.

I addressed the GPL and licensing issues as follow

1) Plugin is GPL and non encoded

2) Plugin has free version

3) Premium version comes with support and access to membership forum as well as bonus features that are unlocked with the license key

4) When someone buys the system generate a random 32 character key that has a few decillion possible unique values, sets up a membership account and emails them the login so they can log in and get their license key

5) Member enters their license key in the plugin's admin settings

6) Custom validation makes remote call to check license key is valid - a green tick is placed alongside the key if it is valid and a red cross if it is invalid

7) Whenever, the plugins page is visited, and the 12 hour cache has expired, a remote license check is made: I collect referrer information so I know on how many domains the license is being used - I could add more restrictions in the license validator but do not need to yet as nobody is taking the mickey


Because the code is GPL anyone can take it and remove the license checking if they wanted to so the security will not deter anyone with a little bit of time and determination who does not want to pay me for my work. This approach makes sense for me as the plugin is cheap so it is not worth spending a lot of time and effort to protect it.

However, I would go down the IonCube encryption route if you need to protect the code better. This can still be GPL as long as you offer to give anyone a copy of the unencrypted code to anyone who asks for it. (That's the rules). However you can send them a printout of the code by post so it you think the requestor has mal intent you can make it a little more difficult for them.

If you require more protection, then you can move some of the code on to a server and implement the plugin as a client/server implementation. Here you protect your IPR by hosting the key components on your own server while the client part of the plugin is GNU Lesser General Public License. Matt Mullenweg's own Akismet plugin is an example of the client/server approach

If you would like the random license key generator code just PM me.

Gravity Forms is also one of the most pirated plugins out there. They still do really well because they have a great product and a known brand.

Unomateo 21st September 2011 02:33 PM

Re: Issue a license key for a wordpress plugin?
 
I run a central wordpress admin tool that allows me to manage remote wordpress networks. I built an Oauth client/server with tokens. Oauth is a standard used by nearly all social networks so it's well supported.

My steps are as follows.
1. user activates my plugin
2. user connects their blog to my network. A secure window pops up asking for username and password. (they previously made a user account).
3. If user is authenticated, I generate a random key and key secret and store it in the options of the wordpress blog and on my server. I also record the domain name.

Now each call has the key, secret, domain, and signature sent. If the signature doesn't match, authentication fails and script dies...

You're not going to be able to hide your code and people will be able to reverse engineer any code. that's just the nature of building on wordpress, but the upside is, if you make a good product you have a lot of blogs to market to (14.7 million)

RobKonrad 23rd November 2011 05:26 AM

Re: Issue a license key for a wordpress plugin?
 
@Andrew:

Just found this thread when going though my subscription list. Am I right that this has evolved into your WP Plugin WSO?

If so, I can happily close the subscription, if not let me know. I didn't have the time to have a look at my purchase so far...
Cheers, Rob


All times are GMT -6. The time now is 07:32 PM.