I have some php code that works most of the time when run against the LimeLM API, but sometimes gets the following error:
Failed to get Key ID: (1) The product key was not found.LicenseID = 6xd2gfu88kcgfzx6itpy85mscwta
Notice that the key varies depending on the request but is a valid key.
A snip of the code that I run that gets the error is below:
$licenseID = $_POST['licenseID'];$pkeys = "";
// Get License key from server
require('LimeLM.php');
LimeLM::SetAPIKey($LimeAPIKey);$version_id = 'My Version ID Is HERE';$bSuccess = false;$pkeys = "";$errorMsg = "";try{ // First get the product key $xml = new SimpleXMLElement(LimeLM::GetPKeyID($version_id, $licenseID)); if ($xml['stat'] != 'ok') { // use the error code & message $errorMsg = 'Failed to get Key ID: ('.$xml->err['code'].') ' . $xml->err['msg']; report($licenseID, $errorMsg); // this sends the error message exit ('Invalid License'); }// More code}
Is there something I'm doing wrong that it fails sometimes? The license ID used is one that is valid so it is unclear why the GetPKeyID is failing.
Thanks for any ideas on what might be wrong.