// Validate license
protected function __mode_rbvalidate() {
// Insure required params
$this->ensure_none_empty(array('api_login', 'api_pass', 'license'), true);
// Generate license simplexml object
try {
$license = new SimpleXMLElement(stripslashes($this->request['license']));
} catch (Exception $e) {
$this->xmldie('Bad License Posted');
}
// Set clientid in request params
$this->request['clientid'] = $this->stripnonascii((string) $license->License->ClientID);
// Generate service simplexml object
try {
$service = new SimpleXMLElement(stripslashes($this->_getScriptResponse('getRbClientPacks.php5', array('api_login', 'api_pass', 'clientid'), array(), true, false)));
} catch (Exception $e) {
$this->xmldie('No License');
}
// Update license
$license->License->LicenseDate = (string) $service->response->service->start;
$license->License->LicenseExpiry = (string) $service->response->service->end;
// Output updated license
$this->xmldie($license->asXML());
}