Jump to content
TrippleEx

Adding WHMCS Licensing Addon to custom PHP Project

Recommended Posts

First of all, i have already WHMCS in last Version. İ have a special standalone (it is not a WHMCS Modul) Client Control Panel for İPTV Bunisness. İt is codes in PHP with Bootstrap 4.

İ want use the WHMCS [Licensing Addon](https://docs.whmcs.com/Licensing_Addon) to sale this Control Panel. So it nee to be integrated on two places,

1. İn to install Script (The client need put his License Key), İf License is valid, so the installation continues. İf not, the installation will abort.

2. The entered License Key need be shown on General Settings of my PHP Script, it need be shown Licenses İnformations like License Holder Name and how long the License is valid and so one. İf the License is expired, suspended so the Login must be locked and the Licenses status information need be displayed on the login screen.

Please let me know how much this license check migration does will be cost.

Kind regards

Share this post


Link to post
Share on other sites

In modules/servers/licensing you can find check_sample_code.php. This script is commented and is all you need to understand how to configure and implement the licensing script in your module. I quote the most relevant part.

// Replace "yourprefix" with your own unique prefix to avoid conflicts with
// other instances of the licensing addon included within the same scope
function yourprefix123_check_license($licensekey, $localkey='') {

    // -----------------------------------
    //  -- Configuration Values --
    // -----------------------------------

    // Enter the url to your WHMCS installation here
    $whmcsurl = 'http://www.yourdomain.com/whmcs/';
    // Must match what is specified in the MD5 Hash Verification field
    // of the licensing product that will be used with this check.
    $licensing_secret_key = 'abc123';
    // The number of days to wait between performing remote license checks
    $localkeydays = 15;
    // The number of days to allow failover for after local key expiry
    $allowcheckfaildays = 5;

At the very end of this script you can find an example of how it can be integrated with your module. This is the basic configuration but there are some other details that you should consider.

First off obviously the licensing script and the entire module must be obfuscated otherwise people could remove your protection by simply putting ! in your if($licenseValid == true). Secondly I highly advise to implement the concept of having a local key so that your server doesn't get flood by a check-license request every time clients refresh page on your module.

Last thing. You should consider to customise the checking function and its implementation for greater security. Make it a difficult to understand / decompile.

Edited by Kian

Share this post


Link to post
Share on other sites

@Kian I made a school closing system that actually uses the WHMCS licensing system, and does what you are wanting it to do.. to check if the license is valid before the install. I can help you do that! I also have IonCube if you'd like help encoding your project :) Sorry it took me so long to reply. I moved out of state to a new state and had a ton of things going on! I'm back and more than happy to assist you!

Share this post


Link to post
Share on other sites

To all wondering... I've been working on scripts that have an installer and works with the licensing hand in hand. For those that need assistance or would like a build, I can assist you! The installer checks to see if an entered key is valid, and in my software scripts, I have the licensing check, so it will actively make sure the key is valid! The same works with a TRIAL license key! After the trial expires, the key expires.

Share this post


Link to post
Share on other sites

Hello Can some one help me I stuck I want to add this license to my kodi addon what I have make but I am not finding out how all this work I have look online but not any closer new to whmcs 

Share this post


Link to post
Share on other sites

@mfoland

We have a WHMCS will release in the next 12 days, if you can help us to integrate Licensing system.

Pm me please

Share this post


Link to post
Share on other sites
On 3/9/2019 at 4:36 AM, mfoland said:

PM me I can assist!

Can you please send me your email in order to contact you

i can’t PM due to new account restrictions 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated