I have a custom licensing feature developed for my wordpress plugins and themes. I have used to add that in all the plugins and themes that I develop. But any one can remove the integration code from the plugin and take the licensing out. Is there any way to avoid this hack.? I am looking for a best option to do this.
In themes
I used to add the licensing integration code in
functions.php
In plugins
Code is added in the the
index.php
Any with knowledge in PHP can hack in and remove this code and redistribute the software for free.
What is the right best way to integrate a software with license feature.
Any help is greatly appreciated.
There are all sorts of things you can do to make it more difficult for people to use unlicensed versions of your application, but I’m not aware of any solution that works 100% of the time.
Obfuscation
You can use obfuscate your code using something like ZendGuard or Source Guardian, but that will likely annoy legitimate customers who need to see your source and it still won’t be 100% effective.
Call Home
You could bury a “call home” somewhere in your code that will let you know where your application is installed. If you think someone has an unlicensed version you would then have the ability to reach out to them and let them know they need the licensed version.
This code could be removed just like the licensing check, but unlike the licensing check it does not need to be removed in order for your application to work without a license.
In practice, I don’t think the issue you are trying to address is that big of a problem. The subset of people who don’t want to pay for your software, but will be persuaded to pay by your licensing solution is pretty small.
I would focus my time on improving my application rather than trying to deter freeloaders, possibly at the expense of legitimate customers.
Consider offering incentives to legitimate customers that unlicensed users would not have access to such as support and updates.