You're not passing a version ID. Hence the error. Is $LimeLM_VersionID set? No, it's not.
i am running this code and getting 109 The version doesn't exist or you don't have access to it.
function SendPKeys($quantity){ //Note: we put LimeLM in this directory. Change it as needed. require('LimeLM.php');
global $LimeLM_VersionID, $LimeLM_ApiKey;
$errors = false;
// set your API key LimeLM::SetAPIKey($LimeLM_ApiKey);
// Generate the product key - set the number of activations using the quantity $xml = new SimpleXMLElement(LimeLM::GeneratePKeys($LimeLM_VersionID, 1, $quantity));
if ($xml['stat'] == 'ok') { foreach ($xml->pkeys->pkey as $pkey) { // add a newline if you're generating more than one key if ($product_keys) $product_keys .= "\r\n";
// set the product key $product_keys .= $pkey['key']."\r\n"; } } else //failure { // use the error code & message $product_keys = $xml->err['code'].') '.$xml->err['msg']; } return $product_keys;
LimeLM::CleanUp();}
$chek = SendPKeys('1');
You're not passing a version ID. Hence the error. Is $LimeLM_VersionID set? No, it's not.