Jump to content

Licensing Help Please?


Si

Recommended Posts

Hi,

I'm making a html template available for my customers and am using the licensing module to stop customers purchasing it once and using it on more than one site.

 

I have it set up in WHMCS but where I'm stuck is in what code I place in the html file.

 

I have currently placed this:

 

<?php
require("license.php");
?>

 

at the very top of the file but my question is this:

 

What do I place in the license.php file?

 

I've looked at the client_sample_code.php file that comes with the licensing module, but am not sure if I need to include all of it or just some of it.

 

Anyone help please?

Link to comment
Share on other sites

  • WHMCS CEO

Protecting HTML or open files is tricky. You need to have at least one file you're going to include in the distribution that is encoded PHP using something like Ioncube so that people can't just remove the license check include from it.

 

Once you have that, then it's a simply a case of adding everything from the client_sample_code.php file to the file you want to protect. It is all needed - not just part of it - and that will perform the license check and give you a result to work with - active, suspended, expired, invalid, etc... to be able to determine whether to let the file run or not.

 

You'll also need to create a file for the client to actually enter their icense key into, which could be the license.php file you reference above, and then you just load that into the script and pass it into the check function the sample code provides.

 

Hope that helps.

 

Matt

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

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