Si Posted August 25, 2011 Share Posted August 25, 2011 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? 0 Quote Link to comment Share on other sites More sharing options...
Si Posted August 25, 2011 Author Share Posted August 25, 2011 no-one able to help? :-( 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted August 26, 2011 WHMCS CEO Share Posted August 26, 2011 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 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.