Jump to content

License Key Manager Addon - Part 1


RPS

Recommended Posts

  • Replies 82
  • Created
  • Last Reply

Top Posters In This Topic

So, is this something you would / could use to store cPanel, Fantastico, RVSite Builder, WHMCS, etc licenses in, and then issue them to your dedicated & VPS clients as needed? OR am I missing the boat somewhere?

- I don't see a reason why that wouldn't work.

Link to comment
Share on other sites

  • 4 weeks later...
So, is this something you would / could use to store cPanel, Fantastico, RVSite Builder, WHMCS, etc licenses in, and then issue them to your dedicated & VPS clients as needed? OR am I missing the boat somewhere?

It wouldn't work with cPanel, Fantastico, or RVSiteBuilder as they all license based on IP, and you have to activate that manually. It would work if you have WHMCS reseller licenses, as you get all the license keys and they don't need to be "Licensed to an IP" it does that automatically on first access.

Link to comment
Share on other sites

  • 3 weeks later...

We would like to use License key manager by RPS.

I have few questions.

 

We would like to use our desktop application for tracking business trips.

How can we link this license manager and our desktop program.

 

Is that possible ?

 

Thank you for your answer.

Link to comment
Share on other sites

We would like to use our desktop application for tracking business trips.

How can we link this license manager and our desktop program.

- That is out of the scope of what I am willing to do for free. It is possible though.

Link to comment
Share on other sites

  • 2 months later...

I think Matt is working on his own version of the license key script, so I probably won't update this until I see if he was able to come up with something better.

 

If he doesn't, then I'll add the delete a key function in here.

 

In the mean time, you can look at the database and just remove the row for the key you do not want.

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

I'm not real clear on where this code is being added - what file does this address?

 

Also, I'd be interested in the API code as well.

 

What I would like to do is use this to issue 2 part keys for an ebook I have written..

 

- Because this script should be fine for most people, and most people don't want to shove out $100/year for phpaudit...

 

 

- Here's an example:

 

 

				$kaspersky_response = file_get_contents("http://www.your-domain.com/order.php?key=SomeRandomKeyThatAllowsAccessToAPI&company=Kaspersky&product=AntiVirus&type=OEM");
			$kaspersky_response_parts = explode(",", $kaspersky_response);

			// grab serial number
			$serialnumber = $kaspersky_response_parts[2];

			if(trim($kaspersky_response_parts[0]) == "SUCCESS") {
				// we received a serial number!
				$serialnumber = $kaspersky_response_parts[2];
			}
			else{
				// there was an error, licenses are possibly sold out
				$serialnumber = "There has been an error generating a license, please contact support.";
			}

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...

We resell eset's products NOD32 etc. for us the licenses are given to us per client on purchase every month but we of course would need a way to allocate the product username/password and have a reminder system automated within the whmcs products/service maybe, but ultimately we just need it to generate email reminders of the renewal in advance and possibly create an invoice.

 

Thankyou for the work so far its always appreciated.

Link to comment
Share on other sites

  • 1 month later...

Does this product manage WHMCS licenses? We give WHMCS licenses to our clients, how effective will this software manage it? Will we be able to mark which client has the WHMCS license assigned to them? Is there a drop down menu of all the clients to easily mark who owns the license?

Link to comment
Share on other sites

  • 4 weeks later...

Where does this code go?

 

I would like to use the licensing addon as I don't need to use Matt's as I only plan to sell a few licenses.

- Because this script should be fine for most people, and most people don't want to shove out $100/year for phpaudit...

 

 

- Here's an example:

 

 

				$kaspersky_response = file_get_contents("http://www.your-domain.com/order.php?key=SomeRandomKeyThatAllowsAccessToAPI&company=Kaspersky&product=AntiVirus&type=OEM");
			$kaspersky_response_parts = explode(",", $kaspersky_response);

			// grab serial number
			$serialnumber = $kaspersky_response_parts[2];

			if(trim($kaspersky_response_parts[0]) == "SUCCESS") {
				// we received a serial number!
				$serialnumber = $kaspersky_response_parts[2];
			}
			else{
				// there was an error, licenses are possibly sold out
				$serialnumber = "There has been an error generating a license, please contact support.";
			}

Link to comment
Share on other sites

  • 11 months later...

Can I ask as to where i put this code as i'm lossed?

 

Any help would be welcomed

 

David

Here's the next part for anyone that wants to see how the API works to issue a license.

 

So you have the license key manager installed, and now you want to connect to it, so that it issues a license, and updates the database so that the license is no longer available.

 

You can test the script by going to:

 

http://www.your-domain.com/order.php?key=SomeRandomKeyThatAllowsAccessToAPI&company=Kaspersky&product=AntiVirus&type=OEM

 

You will need to update the Company, Product, and Type variables that are passed, to line up with a license that is in your database (look at an entry on the license key mod page).

 

<?php
// location for WHMCS configuration file
require('../../../../configuration.php');


$key = $_GET['key'];
$company = $_GET['company'];
$product = $_GET['product'];
$type = $_GET['type'];

// http://www.your-domain.com/order.php?key=SomeRandomKeyThatAllowsAccessToAPI&company=Kaspersky&product=AntiVirus&type=OEM
if($key == "SomeRandomKeyThatAllowsAccessToAPI")
{
mysql_connect($db_host, $db_username, $db_password) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());

# Let's grab the ID and License Key for the first license that is available
$result = mysql_query("SELECT `id`,`key` FROM mod_license_keys WHERE avail='1' AND company='".$company."' AND product='".$product."' AND type='".$type."' LIMIT 1");

$grab_fieldname = mysql_fetch_row($result);
$id = $grab_fieldname[0];
$licensekey = $grab_fieldname[1];

// License is sold out, send error message
if(!$licensekey){
	echo "SOLD OUT";}
else{
	// output the id (location) and serial number
	echo "SUCCESS,".$id.",".$licensekey;}

// set serial number to be no longer available
mysql_query("UPDATE mod_license_keys SET avail='0' WHERE id='".$id."'");
}
?>

Link to comment
Share on other sites

Can I ask as to where i put this code as i'm lossed?

 

Any help would be welcomed

 

David

 

 

You can place this under /modules/admin/license_keys/

 

But i had to change the following for it to work.

 

require('../../../../configuration.php');

 

to

 

require('../../../configuration.php');

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