Jump to content

Licensing Addon

Recommended Posts

Please someone, I'm not able to configure the file that comes with Licensing Addon, somehow it is not working, he captures the license just right ...

But I can not do the following things:

1 - Locking the display of the content, if the license is locked, or in the wrong folder;

2 - Change the license without having to access the file ...

Link to comment
Share on other sites



First do you have the code and includes inside the index file or login file so no access to anything if license is locked?


Second check your settings inside the function file. There are two settings. $localkeydays and $allowcheckfaildays. I found if you have these set more than one day it could keep you from changing status immediately as it does not even check status until told to do so.


Let us know if that helps. Thats all i can think of for now.

Link to comment
Share on other sites

Sorry im not modifying anyones file sorry i just dont do that. but what i will do is point you to this, i hope this will expain it to you as it was confusing for me as well because of how they presented it, and your talking to someone that wrote a php license software of their own lol. I was scratching my head lol.


Here check this out. LOOK AT POST #20 hope this helps you.



Link to comment
Share on other sites

I did not understand the exact working ...

My system is set up only by changing the fields in the base file works .. See what the system returns me ...



[status] => Active

[registeredname] => Peter Abucarma Lazari

[companyname] => Cloud

=> cloudsp@hotmail.com.br

[serviceId] => 150

[ProductID] => 78

[productname] => a license § Test

[regdate] => 05.01.2012

[nextduedate] => 0000-00-00

[billingcycle] => Free Account

[validdomain] => cloudsp.com.br, www.cloudsp.com.br

[validip] =>

[validdirectory] => / home/cloudspc/public_html/licenca2

[md5hash] => c74889421161f4e3e2d2882d70fec610

[checkdate] => 20120502

[localkey] => = 03OiIDM1AjMxAjMioDO6M3OiUG**R2ajVGajJiO5ozc7ICMxYzYlZGM3QmM4gjMkJTZzUGNmFjNxEjM











[remotecheck] => 1



My problems are the following:


How to change the license key, without having to return the file. eg make him take the license key via a TXT file.

Link to comment
Share on other sites

So your asking how to issue a new license key for example Owned-xxxxxx you want to issue Owned-yyyyyy without having to access his txt file?


My lic file is not a txt file its a php file so i wonder about if your confusing it for some reason. The only txt file is the local key file.


That is not how it is set up using a flat file for the lic key, the customer has to post the llicense Owned-????? into the flat file, unless you want to send them the flat file. And why would you want control over that file, it is made the way it is because when your customer purchases an item they need to be notified of thier license key and then they copy and paste that into the php file.


When you change the status of a license you dont need to do anything to thier files, you just change your admin and it will see that status when it checks from their end.

Edited by durangod
Link to comment
Share on other sites

What I mean is, the module works, if you enter the license that my WHMCS generates $ licensekey field it will work ... The problem is in two points ...


1 - How to change the license, eg, when someone buys a license to istalar module receives the license and does not want him to enter the file checker to change the license, you know? I want him to change the license in another way, if you had to create a file type the configuration of WHMCS help me a lot ...


2 - When a license gets suspended status, the module continues to operate normally, what should I do to fix?


Matt, please help me ...

Link to comment
Share on other sites

OK i think i see what your saying. Right now the only way you can change the license is to access the function file (license check file) and you dont want the customer inside that file. Which is the way it should be.


in my instructions all you do is create a very simple php file and call it something like lic_config.php and inside that file (see those instructions on that link) you put that info as it says in the instructions.


something like (lets call this newphpfile.php)


/* Please replace the text (in quotes) with the license key provided to you during the order process at blahblahblaHosting.com.

* example:

* $license_key="put your key here";







then your customer when they buy your item, they copy their license key inside this file.



on your end all you need to do is remove this part in the sample code and replace it with this.


(this will make it so your customer has no need to go into your file thus keeping the customer out of your file so you can encrypt your file if you want to)


original sample code looked like this


# Get Variables from storage (retrieve from wherever it's stored - DB, file, etc...)

$licensekey = "WHMCS-c5adf50c9a";

$localkey = '9tjIxIzNwgDMwIjI6gjOztjIlRXYkt2Ylh2YioTO6M3OicmbpNnblNWasx1cyVmdyV2ccNXZsVHZv1GX











That same section is now like this


//this retrieves the encrypted code that used to be here but now it is in a flat file.

$localkeyfile = 'local_license.txt';

$localkey = file_get_contents($localkeyfile);

//just make sure you have the flat file named local_license.txt or whatever you want to call it.


The license key this part from above ($licensekey = "WHMCS-c5adf50c9a" ) is handled by just doing an php include in the index or login file you secured.




and then just add the newphpfile.php to their root dir of your software.


now if you change the license thru the admin panel all the customer has to do is post the new license in his lic_config file and he does not have to go into your function file at all.


The license will continue to operate until the clients end updates status. And that will be as soon as you set it to update again.


does that help. If not ill leave this for matt cause obviously either your making this more compalicated than it is (understandably of course) or im not explaining correctly.


A new license key is generated with every new purchase so every cust will have a dif key. And in their letter they are instructed to post that key inside the newphpfile config file you created.


Let me know..

Edited by durangod
Link to comment
Share on other sites

I did the process exactly as you said ... But it's that it is invalid .. He does not even go check on the license server ...


Is to make the modification in the file for me?? So this failure to succeed, to be 100% set up and can not do it.


Here is the file that comes with the module, so if someone can customize it for me ...



To return the file configured, send a ticket to https://www.cloudsp.com.br/submitticket.php?step=2&deptid=5


It would be nice to me if someone could apply the settings of the above post, since I could not make the same ....


I would be eternally grateful ...

Edited by cloudspc
Link to comment
Share on other sites

We will get there. And i bet before long you will be like, ohhhhhhh thats how it works, so easy but yet explained so badly so many times lol



Ok i think the best thing to do is start from scratch. We will do this one file at a time ok, and trouble shoot from there. That way you understand the process and then you can help others.


The first thing that i need to know is, do you have a piece of software that is yours, you either wrote it or you have the rights to distribute it?


Is it written in php?


Does it have login.php on the admin side of the software. What i am asking is most php softwares have an admin panel, and that is where you want to license this, you dont want to tick off the users. You just want to keep admin out of admin if the license is no good.


So do you have an admin panel, and does it have a login.php file?


We will go from there .

Edited by durangod
Link to comment
Share on other sites

So we already by parts, we first solve the problem of being able to edit the license without having to access the official file of the module ... The tutorial you gave me that did not work ...

What do I do now is learn how to create a template file configuration.php only with the permission of the system so that my client can change the license key easily in the future ... Understand?

Link to comment
Share on other sites

first bud, the client will always have access to the license key. You cant get away from that unless you just want to babysit your client thru the whole process.


Your still trying to make your method work and im trying to tell you that unless you understand what parts and where they go youll never get it to work.


You have to take come code out or the sample and put it in another file, i will explain why later. Then you have to mod some of the code at the bottom of the function.


Thats why i suggested that we start over, start with a fresh sample file and undo what you have done and i will walk you thru it. But i cant help you if you keep wanting make something that is wrong work. Does that make sense?


I am willing to take you step by step, tell you exactly what to put where, i will even call you if you want me to if you live in the usa, we can do this on the phone. But we have to start over from square one, thats the only way i will do this. Im not going to try to figure out what you did wrong where, we will just start fresh.


If you want me to help, then you need to answer my question from my prev post.

Edited by durangod
Link to comment
Share on other sites

Yes the first that softwere queero pagseguro license is a module for WHMCS, I have full right to distribute it ... And if you know payment modules for WHMCS, it's pagseguro works the same way ...



Yes I want to make step by step.

Link to comment
Share on other sites

Almost everything solved ... Less than one problem ...

could cause the system to get the license to a TXT file, and entered into the system without having to enter the script license itself.

but the problem is that when it comes to payment modules WHMCS, it does not work, put the TXT file in the same folder as the payment module just right and he did not get the license ... What can be the problem?

Do the same thing to enter the license or Wordpress stores and it works without problems.

Link to comment
Share on other sites

No clue because i dont have a clue what your referring to payment modules. You lost me why are you using this for whmcs payment modules. All i can say is that the includes and the files you created must be in your software, every copy of it that you release to clients. Sounds to me that your really pushing the limit to what the purpose of this addon is for or used. But i am glad you got it working. As far as the payment modules, you lost me totally.

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.

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