Parallels::getAvailableKeyTypesAndFeatures()   A
last analyzed

Complexity

Conditions 3
Paths 2

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 0
Metric Value
cc 3
eloc 7
nc 2
nop 1
dl 0
loc 10
ccs 0
cts 0
cp 0
crap 12
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Parallels Functionality
4
 *
5
 * API Documentation at: .. ill fill this in later from forum posts
6
 *
7
 * @author Joe Huss <[email protected]>
8
 * @copyright 2019
9
 * @package MyAdmin
10
 * @category Licenses
11
 */
12
13
namespace Detain\Parallels;
14
15
require_once __DIR__.'/../../../workerman/statistics/Applications/Statistics/Clients/StatisticClient.php';
16
17
use XML_RPC2_Client;
18
19
/**
20
 * Parallels
21
 *
22
 * @access public
23
 */
24
class Parallels
25
{
26
	public $licenseType = 'billing'; // billing or purchase
27
	private $xmlOptions = ['sslverify' => false];
28
	private $defaultUrl = 'https://ka.parallels.com:7050/';
29
	private $defaultDemoUrl = 'https://kademo.parallels.com:7050/';
30
	public $url = '';
31
	public $response;
32
	private $client = '';
33
	private $login = '';
34
	private $password = '';
35
	public $xml;
36
37
	/**
38
	 * @param NULL|string $login api login, NULL(default) to use the PARALLELS_KA_LOGIN setting
39
	 * @param NULL|string $password api password, NULL(default) to use the PARALLELS_KA_PASSWORD setting
40
	 * @param NULL|string $client api client, NULL(default) to use the PARALLELS_KA_CLIENT setting
41
	 * @param bool $demo defaults to FALSE, whether or not to use the demo interface instae dof the normal one
42
	 * @param NULL|array $xmlOptions array of optoins ot pass to xmlrpc2 client
43
	 */
44
	public function __construct($login = null, $password = null, $client = null, $demo = false, $xmlOptions = null)
45
	{
46
		if (null === $login && defined('PARALLELS_KA_LOGIN')) {
47
			$this->login = constant('PARALLELS_KA_LOGIN');
48
		} else {
49
			$this->login = $login;
50
		}
51
		if (null === $password && defined('PARALLELS_KA_PASSWORD')) {
52
			$this->password = constant('PARALLELS_KA_PASSWORD');
53
		} else {
54
			$this->password = $password;
55
		}
56
		if (null !== $client) {
57
			$this->client = $client;
58
		} elseif (defined('PARALLELS_KA_CLIENT')) {
59
			$this->client = constant('PARALLELS_KA_CLIENT');
60
		}
61
		if ($demo === true) {
62
			$this->url = $this->defaultDemoUrl;
63
		} elseif ($demo === false) {
0 ignored issues
show
introduced by
The condition $demo === false is always true.
Loading history...
64
			$this->url = $this->defaultUrl;
65
		} else {
66
			$this->url = $demo;
67
		}
68
		if (null !== $xmlOptions) {
69 1
			$this->xmlOptions = $xmlOptions;
70 1
		}
71
		require_once 'XML/RPC2/Client.php';
72
		$this->xml = \XML_RPC2_Client::create($this->url, $this->xmlOptions);
73
	}
74
75
	/**
76
	 * @return array
77
	 */
78
	public function authInfo()
79
	{
80
		return ['login' => $this->login, 'password' => $this->password];
81
	}
82
83
	/**
84
	 * @param array $ips
85
	 * @param array $macs
86
	 * @return array
87
	 */
88
	public function serverAddress($ips = [], $macs = [])
89
	{
90
		if (!is_array($ips) && $ips != '') {
0 ignored issues
show
introduced by
The condition is_array($ips) is always true.
Loading history...
91
			$ips = [$ips];
92
		}
93
		if (!is_array($macs) && $macs != '') {
0 ignored issues
show
introduced by
The condition is_array($macs) is always true.
Loading history...
94
			$macs = [$macs];
95
		}
96
		return [
97
			'ips' => $ips,
98
			'macs' => $macs
99
		];
100
	}
101
102
	/**
103
	 * @param $key
104
	 * @return mixed
105
	 */
106
	public function terminateKey($key)
107
	{
108
		\StatisticClient::tick('Parallels', 'terminateKey');
0 ignored issues
show
Bug introduced by
The type StatisticClient was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
109
		$this->response = $this->xml->__call('partner10.terminateKey', [$this->authInfo(), $key]);
110
		if ($this->response === false) {
111
			\StatisticClient::report('Parallels', 'terminateKey', false, 1, 'XML Call Error', STATISTICS_SERVER);
0 ignored issues
show
Bug introduced by
The constant Detain\Parallels\STATISTICS_SERVER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
112
		} else {
113
			\StatisticClient::report('Parallels', 'terminateKey', true, 0, '', STATISTICS_SERVER);
114
		}
115
		return $this->response;
116
	}
117
118
	/**
119
	 * @param $key
120
	 * @return mixed
121
	 */
122
	public function resetKey($key)
123
	{
124
		\StatisticClient::tick('Parallels', 'resetKey');
125
		$this->response = $this->xml->__call('partner10.resetKey', [$this->authInfo(), $key]);
126
		if ($this->response === false) {
127
			\StatisticClient::report('Parallels', 'resetKey', false, 1, 'XML Call Error', STATISTICS_SERVER);
0 ignored issues
show
Bug introduced by
The constant Detain\Parallels\STATISTICS_SERVER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
128
		} else {
129
			\StatisticClient::report('Parallels', 'resetKey', true, 0, '', STATISTICS_SERVER);
130
		}
131
		return $this->response;
132
	}
133
134
	/**
135
	 * @param $key
136
	 * @return mixed
137
	 */
138
	public function activateKey($key)
139
	{
140
		\StatisticClient::tick('Parallels', 'activateKey');
141
		$this->response = $this->xml->__call('partner10.activateKey', [$this->authInfo(), $key]);
142
		if ($this->response === false) {
143
			\StatisticClient::report('Parallels', 'activateKey', false, 1, 'XML Call Error', STATISTICS_SERVER);
0 ignored issues
show
Bug introduced by
The constant Detain\Parallels\STATISTICS_SERVER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
144
		} else {
145
			\StatisticClient::report('Parallels', 'activateKey', true, 0, '', STATISTICS_SERVER);
146
		}
147
		return $this->response;
148
	}
149
150
	/**
151
	 * @param $key
152
	 * @param $note
153
	 * @return mixed
154
	 */
155
	public function addNoteToKey($key, $note)
156
	{
157
		\StatisticClient::tick('Parallels', 'addNoteToKey');
158
		$this->response = $this->xml->__call('partner10.addNoteToKey', [$this->authInfo(), $key, $note]);
159
		if ($this->response === false) {
160
			\StatisticClient::report('Parallels', 'addNoteToKey', false, 1, 'XML Call Error', STATISTICS_SERVER);
0 ignored issues
show
Bug introduced by
The constant Detain\Parallels\STATISTICS_SERVER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
161
		} else {
162
			\StatisticClient::report('Parallels', 'addNoteToKey', true, 0, '', STATISTICS_SERVER);
163
		}
164
		return $this->response;
165
	}
166
167
	/**
168
	 * @param      $key
169
	 * @param bool $email
170
	 * @return mixed
171
	 */
172
	public function sendKeyByEmail($key, $email = false)
173
	{
174
		\StatisticClient::tick('Parallels', 'sendKeyByEmail');
175
		if ($email === false) {
176
			$this->response = $this->xml->__call('partner10.sendKeyByEmail', [$this->authInfo(), $key]);
177
		} else {
178
			$this->response = $this->xml->__call('partner10.sendKeyByEmail', [$this->authInfo(), $key, $email]);
179
		}
180
		if ($this->response === false) {
181
			\StatisticClient::report('Parallels', 'sendKeyByEmail', false, 1, 'XML Call Error', STATISTICS_SERVER);
0 ignored issues
show
Bug introduced by
The constant Detain\Parallels\STATISTICS_SERVER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
182
		} else {
183
			\StatisticClient::report('Parallels', 'sendKeyByEmail', true, 0, '', STATISTICS_SERVER);
184
		}
185
		return $this->response;
186
	}
187
188
	/**
189
	 * @param       $keyType
190
	 * @param array $upgradePlans
191
	 * @param array $ips
192
	 * @param array $macs
193
	 * @param bool  $licenseType
194
	 * @param bool  $client
195
	 * @return mixed
196
	 */
197
	public function createKey($keyType, $upgradePlans = [], $ips = [], $macs = [], $licenseType = false, $client = false)
198
	{
199
		if (!is_array($ips) && $ips != '') {
0 ignored issues
show
introduced by
The condition is_array($ips) is always true.
Loading history...
200
			$ips = [$ips];
201
		}
202
		\StatisticClient::tick('Parallels', 'createKey');
203
		$this->response = $this->xml->__call(
204
			'partner10.createKey',
205
			[
206
																	  $this->authInfo(),
207
																	  $this->serverAddress($ips, $macs), $client === false ? $this->client : $client,
208
																	  $keyType,
209
																	  $upgradePlans, $licenseType === false ? $this->licenseType : $licenseType
210
		]
211
		);
212
		if ($this->response === false) {
213
			\StatisticClient::report('Parallels', 'createKey', false, 1, 'XML Call Error', STATISTICS_SERVER);
0 ignored issues
show
Bug introduced by
The constant Detain\Parallels\STATISTICS_SERVER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
214
		} else {
215
			\StatisticClient::report('Parallels', 'createKey', true, 0, '', STATISTICS_SERVER);
216
		}
217
		return $this->response;
218
		/* Success:
219
		Array
220
		(
221
		[mainKeyNumber] => PLSK.00004266.0000
222
		[expirationDate] => stdClass Object
223
		(
224
		[scalar] => 20131209T00:00:00
225
		[xmlrpc_type] => datetime
226
		[timestamp] => 1386547200
227
		)
228
229
		[productKey] => DETAIN-2TVB02-ZT1R57-AY2442-6WN966
230
		[additionalKeysNumbers] => Array
231
		(
232
		)
233
234
		[resultCode] => 100
235
		[resultDesc] => PLSK.00004266.0000 has been successfully created.
236
		[updateDate] => stdClass Object
237
		(
238
		[scalar] => 20131129T00:00:00
239
		[xmlrpc_type] => datetime
240
		[timestamp] => 1385683200
241
		)
242
243
		)
244
		*/
245
	}
246
247
	/**
248
	 * @param $key
249
	 * @return mixed
250
	 */
251
	public function retrieveKey($key)
252
	{
253
		\StatisticClient::tick('Parallels', 'retrieveKey');
254
		$this->response = $this->xml->__call('partner10.retrieveKey', [$this->authInfo(), $key]);
255
		if ($this->response === false) {
256
			\StatisticClient::report('Parallels', 'retrieveKey', false, 1, 'XML Call Error', STATISTICS_SERVER);
0 ignored issues
show
Bug introduced by
The constant Detain\Parallels\STATISTICS_SERVER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
257
		} else {
258
			\StatisticClient::report('Parallels', 'retrieveKey', true, 0, '', STATISTICS_SERVER);
259
		}
260
		return $this->response;
261
		/* Success
262
		Array
263
		(
264
		[keyExtension] => xml
265
		[resultCode] => 100
266
		[resultDesc] => PLSK.00005819.0000 has been successfully retrieved
267
		[keyNumber] => PLSK.00005819.0000
268
		[key] => stdClass Object
269
		(
270
		[scalar] => <?xml version="1.0" encoding="UTF-8"?><plesk-windows:key xmlns:plesk-windows="http://parallels.com/schemas/keys/products/plesk/windows/multi" core:format="openfusion-3" xmlns:core="http://parallels.com/schemas/keys/core/3">
271
		<!--Unique product Key number-->
272
		<core:key-number core:type="string">PLSK.00005819</core:key-number>
273
		<!--Key version-->
274
		<core:key-version core:type="string">0000</core:key-version>
275
		<!--Key description-->
276
		<core:description>
277
		<core:keytype>Parallels Plesk Panel 10.x/11.x and Later for Windows</core:keytype>
278
		<core:feature>Unlimited Domains w/1 yr SUS</core:feature>
279
		<core:feature>Parallels Web Presence Builder - 100 Sites</core:feature>
280
		<core:feature>Parallels PowerPack for Plesk (Windows)</core:feature>
281
		</core:description>
282
		<!--Product which this license is intended to work on-->
283
		<core:product core:type="string">plesk-win</core:product>
284
		<!--Supported product version-->
285
		<core:versions>
286
		<core:from core:type="string">10.0</core:from>
287
		<core:to core:type="string">any</core:to>
288
		</core:versions>
289
		<!--Date after which this license becomes usable (inclusive)-->
290
		<core:start-date core:type="date">instant</core:start-date>
291
		<!--Date before which this license is usable (exclusive)-->
292
		<core:expiration-date core:type="date">2013-12-02</core:expiration-date>
293
		<!--URL of the service endpoint to use when performing an autoupdate-->
294
		<core:license-server-url core:type="string">https://ka.parallels.com:5224/xmlrpc</core:license-server-url>
295
		<!--Date when product will try to perform an autoupdate-->
296
		<core:update-date core:type="date">2013-11-22</core:update-date>
297
		<core:update-ticket core:hidden="true" core:type="string">k0uj75wmlfa1a5hwmk-k43gy2ji0p2y1</core:update-ticket>
298
		<!--Number of domains-->
299
		<plesk-windows:domains core:type="integer">unlimited</plesk-windows:domains>
300
		<!--Number of clients-->
301
		<plesk-windows:clients core:type="integer">unlimited</plesk-windows:clients>
302
		<!--Number of webusers-->
303
		<plesk-windows:webusers core:type="integer">unlimited</plesk-windows:webusers>
304
		<!--Number of mailnames-->
305
		<plesk-windows:mailnames core:type="integer">unlimited</plesk-windows:mailnames>
306
		<!--Number of additional language pack(s)-->
307
		<plesk-windows:language-packs core:type="integer">0</plesk-windows:language-packs>
308
		<plesk-windows:mpc-id core:hidden="true" core:type="integer">0</plesk-windows:mpc-id>
309
		<plesk-windows:mpc-disabled core:hidden="true" core:type="boolean">false</plesk-windows:mpc-disabled>
310
		<!--Google tools-->
311
		<plesk-windows:google-tools core:type="boolean">true</plesk-windows:google-tools>
312
		<plesk-windows:mpc-mng-disabled core:hidden="true" core:type="boolean">false</plesk-windows:mpc-mng-disabled>
313
		<!--Number of slaves-->
314
		<plesk-windows:slaves core:type="integer">0</plesk-windows:slaves>
315
		<!--EventManager-->
316
		<plesk-windows:event-manager core:type="boolean">true</plesk-windows:event-manager>
317
		<!--Domains backup-->
318
		<plesk-windows:domains-backup core:type="boolean">true</plesk-windows:domains-backup>
319
		<!--Tomcat support-->
320
		<plesk-windows:tomcat-support core:type="boolean">true</plesk-windows:tomcat-support>
321
		<!--Subdomains-->
322
		<plesk-windows:subdomains-support core:type="boolean">true</plesk-windows:subdomains-support>
323
		<!--Backward key compatibility restriction-->
324
		<plesk-windows:backward-restriction core:type="integer">0</plesk-windows:backward-restriction>
325
		<!--Work Inside Virtuozzo-->
326
		<plesk-windows:vps-only core:type="boolean">false</plesk-windows:vps-only>
327
		<!--Work Inside Hyper-V-->
328
		<plesk-windows:hyper-v core:type="boolean">false</plesk-windows:hyper-v>
329
		<!--Work Inside VMware-->
330
		<plesk-windows:vmware core:type="boolean">false</plesk-windows:vmware>
331
		<!--Work Inside Xen-->
332
		<plesk-windows:xen core:type="boolean">false</plesk-windows:xen>
333
		<!--Work Inside KVM-->
334
		<plesk-windows:kvm core:type="boolean">false</plesk-windows:kvm>
335
		<!--Work Inside Parallels Hypervisor-->
336
		<plesk-windows:hypervisor core:type="boolean">false</plesk-windows:hypervisor>
337
		<!--Global changes-->
338
		<plesk-windows:global-changes core:type="boolean">true</plesk-windows:global-changes>
339
		<!--Shell access-->
340
		<plesk-windows:shell-access core:type="boolean">true</plesk-windows:shell-access>
341
		<!--Detailed traffic-->
342
		<plesk-windows:detailed-traffic core:type="boolean">true</plesk-windows:detailed-traffic>
343
		<!--Notification manager-->
344
		<plesk-windows:notification-manager core:type="boolean">true</plesk-windows:notification-manager>
345
		<!--Action log manager-->
346
		<plesk-windows:action-manager core:type="boolean">true</plesk-windows:action-manager>
347
		<!--Clients and Domains Expirations management-->
348
		<plesk-windows:expirations-manager core:type="boolean">true</plesk-windows:expirations-manager>
349
		<!--Client templates-->
350
		<plesk-windows:client-templates core:type="boolean">true</plesk-windows:client-templates>
351
		<!--Ability to use Application Vault-->
352
		<plesk-windows:appvault-support core:type="boolean">true</plesk-windows:appvault-support>
353
		<!--Ability to use SpamAssassin-->
354
		<plesk-windows:spamassasin-support core:type="boolean">true</plesk-windows:spamassasin-support>
355
		<!--Ability to use Trouble Ticketing System-->
356
		<plesk-windows:tts-support core:type="boolean">true</plesk-windows:tts-support>
357
		<!--Ability to use ColdFusion-->
358
		<plesk-windows:coldfusion-support core:type="boolean">true</plesk-windows:coldfusion-support>
359
		<plesk-windows:ask-update core:hidden="true" core:type="boolean">false</plesk-windows:ask-update>
360
		<plesk-windows:autoinstaller-config core:hidden="true" core:type="string">true</plesk-windows:autoinstaller-config>
361
		<!--Ability to use DrWeb-->
362
		<plesk-windows:drweb-support core:type="boolean">true</plesk-windows:drweb-support>
363
		<plesk-windows:store-id core:hidden="true" core:type="integer">1</plesk-windows:store-id>
364
		<!--Ability to use Migration Manager-->
365
		<plesk-windows:migration-manager core:type="boolean">true</plesk-windows:migration-manager>
366
		<!--Ability to use MS SQL-->
367
		<plesk-windows:mssql core:type="boolean">true</plesk-windows:mssql>
368
		<!--Allowed locales-->
369
		<plesk-windows:allowed-locales core:type="string">any</plesk-windows:allowed-locales>
370
		<!--Allows feature upgrades for this version-->
371
		<plesk-windows:feature-upgrades core:type="boolean">true</plesk-windows:feature-upgrades>
372
		<!--Parallels Plesk Billing accounts count-->
373
		<plesk-windows:modernbill-accounts core:type="integer">0</plesk-windows:modernbill-accounts>
374
		<!--Number of sites-->
375
		<plesk-windows:sitebuilder-sites core:type="integer">100</plesk-windows:sitebuilder-sites>
376
		<!--Enable Parallels Plesk Mobile Server Manager-->
377
		<plesk-windows:mobile-server-manager-support core:type="boolean">true</plesk-windows:mobile-server-manager-support>
378
		<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
379
		<ds:SignedInfo>
380
		<ds:CanonicalizationMethod Algorithm="http://parallels.com/schemas/keys/core/3#canonicalize"/>
381
		<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
382
		<ds:Reference URI="">
383
		<ds:Transforms>
384
		<ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
385
		<ds:Transform Algorithm="http://parallels.com/schemas/keys/core/3#transform"/>
386
		</ds:Transforms>
387
		<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
388
		<ds:DigestValue>ENCODED HASH HERE</ds:DigestValue>
389
		</ds:Reference>
390
		</ds:SignedInfo>
391
		<ds:SignatureValue>
392
		ENCODED DATA HERE
393
		</ds:SignatureValue>
394
		<ds:KeyInfo>
395
		<ds:X509Data>
396
		<ds:X509Certificate>
397
		ENCODED DATA HERE
398
		</ds:X509Certificate>
399
		</ds:X509Data>
400
		</ds:KeyInfo>
401
		</ds:Signature>
402
		</plesk-windows:key>
403
404
		[xmlrpc_type] => base64
405
		)
406
407
		)
408
409
		*/
410
	}
411
412
	/**
413
	 * Returns an array with keys 'resultCode', 'resultDesc', and 'upgradePlans'.  the last one being an array of plan names, one time i wrote down the output it looked like:
414
	 * 3_LANGUAGE_PACKS FOTOLIA_OFF 5_LANGUAGE_PACKS  NEWSFEED_OFF VIRTUOZZO_PROMO_OFF ADDITIONAL_LANGUAGE_PACK were some of the packqage types, there wer eothers
415
	 *
416
	 * @param $key
417
	 * @return mixed
418
	 */
419
	public function getAvailableUpgrades($key)
420
	{
421
		\StatisticClient::tick('Parallels', 'getAvailableUpgrades');
422
		$this->response = $this->xml->__call('partner10.getAvailableUpgrades', [$this->authInfo(), $key]);
423
		if ($this->response === false) {
424
			\StatisticClient::report('Parallels', 'getAvailableUpgrades', false, 1, 'XML Call Error', STATISTICS_SERVER);
0 ignored issues
show
Bug introduced by
The constant Detain\Parallels\STATISTICS_SERVER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
425
		} else {
426
			\StatisticClient::report('Parallels', 'getAvailableUpgrades', true, 0, '', STATISTICS_SERVER);
427
		}
428
		return $this->response;
429
	}
430
431
	/**
432
	 * Success
433
	 * Array
434
	 * (
435
	 * [keyInfo] => Array
436
	 * (
437
	 * [expirationDate] => stdClass Object
438
	 * (
439
	 * [scalar] => 20131202T00:00:00
440
	 * [xmlrpc_type] => datetime
441
	 * [timestamp] => 1385942400
442
	 * )
443
	 * )
444
	 * [features] => Array
445
	 * (
446
	 * [0] => Array
447
	 * (
448
	 * [apiName] => PLESK_7X_FOR_WIN_POWER_PACK
449
	 * [name] => Parallels PowerPack for Plesk (Windows) (Monthly Lease)
450
	 * )
451
	 * [1] => Array
452
	 * (
453
	 * [apiName] => PLESK-100-SITES
454
	 * [name] => Parallels Web Presence Builder - 100 Sites (Monthly Lease)
455
	 * )
456
	 * [2] => Array
457
	 * (
458
	 * [apiName] => UNLIMITED_DOMAINS
459
	 * [name] => Unlimited Domains w/1 yr SUS (Lease)
460
	 * )
461
	 * )
462
	 * [billingType] => LEASE
463
	 * [productFamily] => plesk
464
	 * [createDate] => stdClass Object
465
	 * (
466
	 * [scalar] => 20131023T18:02:11
467
	 * [xmlrpc_type] => datetime
468
	 * [timestamp] => 1382551331
469
	 * )
470
	 * [trial] =>
471
	 * [lastReportingDate] => stdClass Object
472
	 * (
473
	 * [scalar] => 20131029T06:27:31
474
	 * [xmlrpc_type] => datetime
475
	 * [timestamp] => 1383028051
476
	 * )
477
	 * [additionalKeys] => Array
478
	 * (
479
	 * [0] => Array
480
	 * (
481
	 * [expirationDate] => stdClass Object
482
	 * (
483
	 * [scalar] => 20131202T00:00:00
484
	 * [xmlrpc_type] => datetime
485
	 * [timestamp] => 1385942400
486
	 * )
487
	 * [lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
488
	 * [apiKeyType] => N/A
489
	 * [boundIPAddress] =>
490
	 * [problem] =>
491
	 * [keyNumber] => KAV.00005821.0001
492
	 * [properties] => Array
493
	 * (
494
	 * )
495
	 * [type] => ADDITIONAL
496
	 * [updateDate] => stdClass Object
497
	 * (
498
	 * [scalar] => 20131122T00:00:00
499
	 * [xmlrpc_type] => datetime
500
	 * [timestamp] => 1385078400
501
	 * )
502
	 * [clientId] => 19282468
503
	 * [parentKeyNumber] => PLSK.00005819.0000
504
	 * [lastReportingVersion] => 11.5.3
505
	 * [keyType] => Parallels Plesk Panel Antivirus Powered by Kaspersky, 5 Mailboxes (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
506
	 * [terminated] =>
507
	 * [susAndSupportInfo] => Array
508
	 * (
509
	 * )
510
	 * [features] => Array
511
	 * (
512
	 * )
513
	 * [billingType] => LEASE
514
	 * [productFamily] => kav
515
	 * [createDate] => stdClass Object
516
	 * (
517
	 * [scalar] => 20131023T18:02:12
518
	 * [xmlrpc_type] => datetime
519
	 * [timestamp] => 1382551332
520
	 * )
521
	 * [trial] =>
522
	 * [lastReportingDate] => stdClass Object
523
	 * (
524
	 * [scalar] => 20131023T18:05:24
525
	 * [xmlrpc_type] => datetime
526
	 * [timestamp] => 1382551524
527
	 * )
528
	 * [additionalKeys] => Array
529
	 * (
530
	 * )
531
	 * )
532
	 * [1] => Array
533
	 * (
534
	 * [expirationDate] => stdClass Object
535
	 * (
536
	 * [scalar] => 20131202T00:00:00
537
	 * [xmlrpc_type] => datetime
538
	 * [timestamp] => 1385942400
539
	 * )
540
	 * [lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
541
	 * [apiKeyType] => N/A
542
	 * [boundIPAddress] =>
543
	 * [problem] =>
544
	 * [keyNumber] => APS.00005820.0001
545
	 * [properties] => Array
546
	 * (
547
	 * )
548
	 * [type] => ADDITIONAL
549
	 * [updateDate] => stdClass Object
550
	 * (
551
	 * [scalar] => 20131122T00:00:00
552
	 * [xmlrpc_type] => datetime
553
	 * [timestamp] => 1385078400
554
	 * )
555
	 * [clientId] => 19282468
556
	 * [parentKeyNumber] => PLSK.00005819.0000
557
	 * [lastReportingVersion] => 11.5.3
558
	 * [keyType] => UNITY One, 2 Domains (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
559
	 * [terminated] =>
560
	 * [susAndSupportInfo] => Array
561
	 * (
562
	 * )
563
	 * [features] => Array
564
	 * (
565
	 * )
566
	 * [billingType] => LEASE
567
	 * [productFamily] => unity-one
568
	 * [createDate] => stdClass Object
569
	 * (
570
	 * [scalar] => 20131023T18:02:11
571
	 * [xmlrpc_type] => datetime
572
	 * [timestamp] => 1382551331
573
	 * )
574
	 * [trial] =>
575
	 * [lastReportingDate] => stdClass Object
576
	 * (
577
	 * [scalar] => 20131023T18:05:26
578
	 * [xmlrpc_type] => datetime
579
	 * [timestamp] => 1382551526
580
	 * )
581
	 * [additionalKeys] => Array
582
	 * (
583
	 * )
584
	 * )
585
	 * )
586
	 * )
587
	 *[resultCode] => 100
588
	 * [resultDesc] => Key info for PLSK.00005819.0000 key returned successfully
589
	 * [keyNumber] => PLSK.00005819.0000
590
	 * )
591
	 *
592
	 * @param $key
593
	 * @return mixed
594
	 */
595
	public function getKeyInfo($key)
596
	{
597
		\StatisticClient::tick('Parallels', 'getKeyInfo');
598
		$this->response = $this->xml->__call('partner10.getKeyInfo', [$this->authInfo(), $key]);
599
		if ($this->response === false) {
600
			\StatisticClient::report('Parallels', 'getKeyInfo', false, 1, 'XML Call Error', STATISTICS_SERVER);
0 ignored issues
show
Bug introduced by
The constant Detain\Parallels\STATISTICS_SERVER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
601
		} else {
602
			\StatisticClient::report('Parallels', 'getKeyInfo', true, 0, '', STATISTICS_SERVER);
603
		}
604
		return $this->response;
605
	}
606
607
	/**
608
	 * @param string $ipAddress the ip address
609
	 * @return false|string false if no key , or a string w/ the key
610
	 */
611
	public function getMainKeyFromIp($ipAddress)
612
	{
613
		$response = $this->getKeyNumbers($ipAddress);
614
		//$response = $this->getKeysInfoByIP($ipAddress);
615
		$return = false;
616
		if (isset($response['keyInfos'])) {
617
			$responseValues = array_values($response['keyInfos']);
618
			foreach ($responseValues as $data) {
619
				if ($return === false) {
620
					$return = $data['keyNumber'];
621
				}
622
				if ($data['type'] == 'MAIN') {
623
					$return = $data['keyNumber'];
624
				}
625
			}
626
			return $return;
627
		} else {
628
			return false;
629
		}
630
	}
631
632
	/**
633
	 * @param $ipAddress
634
	 * @return mixed
635
	 */
636
	public function getKeysInfoByIP($ipAddress)
637
	{
638
		\StatisticClient::tick('Parallels', 'getKeysInfoByIP');
639
		$this->response = $this->xml->__call('partner10.getKeysInfoByIP', [$this->authInfo(), $ipAddress]);
640
		if ($this->response === false) {
641
			\StatisticClient::report('Parallels', 'getKeysInfoByIP', false, 1, 'XML Call Error', STATISTICS_SERVER);
0 ignored issues
show
Bug introduced by
The constant Detain\Parallels\STATISTICS_SERVER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
642
		} else {
643
			\StatisticClient::report('Parallels', 'getKeysInfoByIP', true, 0, '', STATISTICS_SERVER);
644
		}
645
		return $this->response;
646
	}
647
648
	/**
649
	 * @param array|string $ips
650
	 * @param array        $macs
651
	 * @return mixed
652
	 */
653
	public function getKeyNumbers($ips = [], $macs = [])
654
	{
655
		myadmin_log('licenses', 'info', json_encode($this->serverAddress($ips, $macs)), __LINE__, __FILE__);
0 ignored issues
show
Bug introduced by
The function myadmin_log was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

655
		/** @scrutinizer ignore-call */ 
656
  myadmin_log('licenses', 'info', json_encode($this->serverAddress($ips, $macs)), __LINE__, __FILE__);
Loading history...
Bug introduced by
It seems like $ips can also be of type string; however, parameter $ips of Detain\Parallels\Parallels::serverAddress() does only seem to accept array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

655
		myadmin_log('licenses', 'info', json_encode($this->serverAddress(/** @scrutinizer ignore-type */ $ips, $macs)), __LINE__, __FILE__);
Loading history...
656
		\StatisticClient::tick('Parallels', 'getKeyNumbers');
657
		$this->response = $this->xml->__call('partner10.getKeyNumbers', [$this->authInfo(), $this->serverAddress($ips, $macs)]);
658
		if ($this->response === false) {
659
			\StatisticClient::report('Parallels', 'getKeyNumbers', false, 1, 'XML Call Error', STATISTICS_SERVER);
0 ignored issues
show
Bug introduced by
The constant Detain\Parallels\STATISTICS_SERVER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
660
		} else {
661
			\StatisticClient::report('Parallels', 'getKeyNumbers', true, 0, '', STATISTICS_SERVER);
662
		}
663
		return $this->response;
664
		/* Success
665
		Array
666
		(
667
		[keyInfos] => Array
668
		(
669
		[0] => Array
670
		(
671
		[keyType] => Parallels Plesk Panel 10.x/11.x and Later for Windows for Virtual Machines (Lease)
672
		Lease)
673
		[lastReportingIp] => 206.72.205.242
674
		[terminated] => 1
675
		[keyNumber] => KAV.00004873.0002
676
		[billingType] => LEASE
677
		[type] => ADDITIONAL
678
		[createDate] => stdClass Object
679
		(
680
		[scalar] => 20131014T16:44:40
681
		[xmlrpc_type] => datetime
682
		[timestamp] => 1381769080
683
		)
684
685
		[lastReportingDate] => stdClass Object
686
		(
687
		[scalar] => 20131023T17:35:45
688
		[xmlrpc_type] => datetime
689
		[timestamp] => 1382549745
690
		)
691
692
		)
693
694
		[3] => Array
695
		(
696
		[keyType] => Parallels Plesk Panel 10.x/11.x and Later for Windows (Lease)
697
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
698
		[terminated] =>
699
		[keyNumber] => PLSK.00005819.0000
700
		[billingType] => LEASE
701
		[type] => MAIN
702
		[createDate] => stdClass Object
703
		(
704
		[scalar] => 20131023T18:02:11
705
		[xmlrpc_type] => datetime
706
		[timestamp] => 1382551331
707
		)
708
709
		[lastReportingDate] => stdClass Object
710
		(
711
		[scalar] => 20131029T06:27:31
712
		[xmlrpc_type] => datetime
713
		[timestamp] => 1383028051
714
		)
715
716
		)
717
718
		[4] => Array
719
		(
720
		[keyType] => UNITY One, 2 Domains (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
721
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
722
		[terminated] =>
723
		[keyNumber] => APS.00005820.0001
724
		[billingType] => LEASE
725
		[type] => ADDITIONAL
726
		[createDate] => stdClass Object
727
		(
728
		[scalar] => 20131023T18:02:11
729
		[xmlrpc_type] => datetime
730
		[timestamp] => 1382551331
731
		)
732
733
		[lastReportingDate] => stdClass Object
734
		(
735
		[scalar] => 20131023T18:05:26
736
		[xmlrpc_type] => datetime
737
		[timestamp] => 1382551526
738
		)
739
740
		)
741
742
		[5] => Array
743
		(
744
		[keyType] => Parallels Plesk Panel Antivirus Powered by Kaspersky, 5 Mailboxes (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
745
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
746
		[terminated] =>
747
		[keyNumber] => KAV.00005821.0001
748
		[billingType] => LEASE
749
		[type] => ADDITIONAL
750
		[createDate] => stdClass Object
751
		(
752
		[scalar] => 20131023T18:02:12
753
		[xmlrpc_type] => datetime
754
		[timestamp] => 1382551332
755
		)
756
757
		[lastReportingDate] => stdClass Object
758
		(
759
		[scalar] => 20131023T18:05:24
760
		[xmlrpc_type] => datetime
761
		[timestamp] => 1382551524
762
		)
763
764
		)
765
766
		)
767
768
		[resultCode] => 100
769
		[resultDesc] => Found: PLSK.02554871.0001, APS.02554872.0002, KAV.02554873.0002, PLSK.00005819.0000, APS.00005820.0001, KAV.00005821.0001
770
		[keyNumbers] => Array
771
		(
772
		[0] => PLSK.02554871.0001
773
		[1] => APS.02554872.0002
774
		[2] => KAV.02554873.0002
775
		[3] => PLSK.00005819.0000
776
		[4] => APS.00005820.0001
777
		[5] => KAV.00005821.0001
778
		)
779
780
		[detailResultCode] => 0
781
		)
782
		*/
783
	}
784
785
	/**
786
	 * @param bool $client
787
	 * @return mixed
788
	 */
789
	public function getAvailableKeyTypesAndFeatures($client = false)
790
	{
791
		\StatisticClient::tick('Parallels', 'getAvailableKeyTypesAndFeatures');
792
		$this->response = $this->xml->__call('partner10.getAvailableKeyTypesAndFeatures', [$this->authInfo(), $client === false ? $this->client : $client]);
793
		if ($this->response === false) {
794
			\StatisticClient::report('Parallels', 'getAvailableKeyTypesAndFeatures', false, 1, 'XML Call Error', STATISTICS_SERVER);
0 ignored issues
show
Bug introduced by
The constant Detain\Parallels\STATISTICS_SERVER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
795
		} else {
796
			\StatisticClient::report('Parallels', 'getAvailableKeyTypesAndFeatures', true, 0, '', STATISTICS_SERVER);
797
		}
798
		return $this->response;
799
		/* My Output:
800
		Array
801
		(
802
		[resultCode] => 100
803
		[features] => Array
804
		(
805
		[0] => ADDON-CT-OAS-L-1Y
806
		[1] => ADDON-HMP-L-M
807
		[2] => SB10X-500
808
		[3] => ADDON-WPB-12500-M
809
		[4] => MEDIUM
810
		[5] => 30_DOMAINS_FOR_VZ
811
		[6] => PLESK-100-SITES
812
		[7] => SB10X-35000
813
		[8] => STORE_BUTTON_OFF
814
		[9] => 2CPU_90CT_PIM
815
		[10] => 4CPU_1CT_PIM
816
		[11] => SB10X-300
817
		[12] => SB10X-25000
818
		[13] => 3_LANGUAGE_PACKS_FOR_VMM
819
		[14] => UNLIMITED_DOMAINS_1000_BILLING_ACCOUNTS_100_SITES_FOR_VZ
820
		[15] => 8CPU_15HV_PVA
821
		[16] => ADDITIONAL_LANGUAGE_PACK
822
		[17] => SB10X-100
823
		[18] => 4CPU_UNLIMITEDVC_PVA
824
		[19] => PLESK_SWSOFT_SERVICES_OFF
825
		[20] => 8CPU_100CT_PVA
826
		[21] => PLESK_POWER_PACK_FOR_VMM
827
		[22] => 4CPU_20CT_PIM
828
		[23] => PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VMM
829
		[24] => HSPHERE_7500_ACCOUNTS
830
		[25] => CLDF-PLUS-M
831
		[26] => 7500_SITES_MULTI_SERVER
832
		[27] => 4-LANGUAGE-PACKS-FOR-PPA
833
		[28] => MONTHLY_AMPS
834
		[29] => 300_SITES
835
		[30] => UO-UNL-L-1Y
836
		[31] => 2CPU_20CT_PIM
837
		[32] => 8CPU_6HV_PVA
838
		[33] => 4_LANGUAGE_PACKS
839
		[34] => 8CPU_40CT_PVA
840
		[35] => 8CPU_1CT_PVA
841
		[36] => 2CPU_4HV_PVA
842
		[37] => 8CPU_200CT_PVA
843
		[38] => 4CPU_60CT_PIM
844
		[39] => 100_EXT_WHITELABEL
845
		[40] => 8CPU_50CT_PVA
846
		[41] => PLESK-UNLIMITED-PB-ACCOUNTS
847
		[42] => SB10X-40000
848
		[43] => PLESK_HOSTING_SUITE_FOR_VZ
849
		[44] => HSPHERE_3750_ACCOUNTS
850
		[45] => 2CPU_7HV_PVA
851
		[46] => 4CPU_5CT_PIM
852
		[47] => UNLIMITED_USERS_FOR_VPS
853
		[48] => PLESK-100-SITES-FOR-VZ
854
		[49] => PLESK_RELOADED_FOR_VZ_POWER_PACK
855
		[50] => 8CPU_10HV_PVA
856
		[51] => ADDONVZ-CT-OAS-L-1Y
857
		[52] => PLESK_7X_FOR_WIN_FOR_VZ_POWER_PACK
858
		[53] => SB10X-2500
859
		[54] => 2CPU_3CT_PIM
860
		[55] => ADDITIONAL_LANGUAGE_PACK_FOR_VZ
861
		[56] => 8CPU_80CT_PVA
862
		[57] => 4CPU_30VC_PVA
863
		[58] => 1000_SITES_MULTI_SERVER
864
		[59] => 1_UNITY_MOBILE_SITE
865
		[60] => 2CPU_40CT_PIM
866
		[61] => EXTRAS_BUTTONS_OFF
867
		[62] => UNLIMITED_DOMAINS_FOR_VMM
868
		[63] => 8CPU_450CT_PVA
869
		[64] => HSPHERE_500_ACCOUNTS
870
		[65] => 4CPU_5VC_PVA
871
		[66] => HSPHERE_1750_ACCOUNTS
872
		[67] => FOTOLIA_OFF
873
		[68] => SB10X-50000
874
		[69] => HSPHERE_1000_ACCOUNTS
875
		[70] => 1000_EXT
876
		[71] => SB10X-7500
877
		[72] => 100_EXTENSIONS
878
		[73] => 2CPU_1CT_PIM
879
		[74] => 1000_EXT_WHITELABEL
880
		[75] => 8CPU_9HV_PVA
881
		[76] => UO-1-L-1Y
882
		[77] => 8CPU_5VC_PVA
883
		[78] => 8CPU_8HV_PVA
884
		[79] => 4_LANGUAGE_PACKS_FOR_VZ
885
		[80] => 4CPU_70CT_PIM
886
		[81] => 30_DOMAINS
887
		[82] => 2_LANGUAGE_PACKS_FOR_VMM
888
		[83] => ADDON-CT-OAS-L-M
889
		[84] => UO-1-W-M
890
		[85] => UNLIMITED-LANGUAGE-PACKS-FOR-PPA
891
		[86] => 100_DOMAINS_FOR_VZ
892
		[87] => ADDON-WPB-1000-M
893
		[88] => STH-WMP-BUSP-M
894
		[89] => UNLIMITED_DOMAINS
895
		[90] => 2CPU_100CT_PIM
896
		[91] => ADDONVZ-HMP-W-M
897
		[92] => DISABLE_SITEBUILDER
898
		[93] => 8CPU_1CT
899
		[94] => HSPHERE_2500_ACCOUNTS
900
		[95] => STH-WMP-BUS-M
901
		[96] => PLESK_POWER_PACK_FOR_WIN
902
		[97] => 8CPU_30VC_PVA
903
		[98] => 8CPU_150CT_PVA
904
		[99] => HSPHERE_5000_ACCOUNTS
905
		[100] => 4CPU_90CT_PIM
906
		[101] => PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VZ
907
		[102] => ADDON-WPB-45000-M
908
		[103] => PLESK_POWER_PACK_FOR_VZ
909
		[104] => 8CPU_250CT_PVA
910
		[105] => 1-LANGUAGE-PACK-FOR-PPA
911
		[106] => UO-UNL-W-M
912
		[107] => 2CPU_5VC_PVA
913
		[108] => ADDON-WPB-15000-M
914
		[109] => PLESK_RELOADED_POWER_PACK
915
		[110] => ADDON-WPB-7500-M
916
		[111] => PLESK-1000-SITES-FOR-VZ
917
		[112] => 10_UNITY_MOBILE_SITES
918
		[148] => 3_LANGUAGE_PACKS_FOR_VZ
919
		[149] => 2CPU_30CT_PIM
920
		[150] => ENTERPRISE
921
		[151] => 2CPU_50CT_PIM
922
		[152] => ADDON-HMP-W-M
923
		[153] => 2_LANGUAGE_PACKS_FOR_VZ
924
		[154] => 4_LANGUAGE_PACKS_FOR_VMM
925
		[155] => UO-UNL-L-M
926
		[156] => SB10X-12500
927
		[157] => 4CPU_50CT_PIM
928
		[158] => ADDON-WPB-20000-M
929
		[159] => HSPHERE_10000_ACCOUNTS
930
		[160] => 4CPU_3CT_PIM
931
		[161] => 3_LANGUAGE_PACKS
932
		[162] => 8CPU_90CT_PVA
933
		[163] => 5000_SITES
934
		[164] => 100_SITES
935
		[165] => PLESK_POWER_PACK
936
		[166] => 8CPU_400CT_PVA
937
		[167] => 500_EXT
938
		[168] => 5000_SITES_MULTI_SERVER
939
		[169] => 5_LANGUAGE_PACKS_FOR_VMM
940
		[170] => UNLIMITED_BATTLEFIELD_SERVERS
941
		[171] => ADDON-WPB-35000-M
942
		[172] => PLESK-100-SITES-FOR-VMM
943
		[173] => ADDON-WPB-50000-M
944
		[174] => 8CPU_4HV_PVA
945
		[175] => 8CPU_5HV_PVA
946
		[176] => 2CPU_10HV_PVA
947
		[177] => ADDON-WPB-300-M
948
		[178] => 2CPU_2HV_PVA
949
		[179] => 300_SITES_MULTI_SERVER
950
		[180] => 10_DOMAINS_FOR_VZ
951
		[181] => 1_LANGUAGE_PACK
952
		[182] => 4CPU_10CT_PIM
953
		[183] => ADDON-WPB-700-M
954
		[184] => 2CPU_30VC_PVA
955
		[185] => 2CPU_1HV_PVA
956
		[186] => 5_USERS_FOR_VPS
957
		[187] => 2CPU_10CT_PIM
958
		[188] => 500_SITES_MULTI_SERVER
959
		[189] => 300_DOMAINS
960
		[190] => 10000_SITES
961
		[191] => 8CPU_2HV_PVA
962
		[192] => ADDON-WPB-10000-M
963
		[193] => PLESK_POWER_PACK_FOR_WIN_FOR_VMM
964
		[194] => PLESK-1000-SITES-FOR-VMM
965
		[195] => 5_LANGUAGE_PACKS
966
		[196] => 1_LANGUAGE_PACK_FOR_VZ
967
		[197] => 2CPU_200CT_PIM
968
		[198] => VIRTUOZZO_PROMO_OFF
969
		[199] => SB10X-5000
970
		[200] => 8CPU_7HV_PVA
971
		[201] => 10_DOMAINS
972
		[202] => PRO
973
		[203] => 500_SITES
974
		[204] => 2CPU_70CT_PIM
975
		[205] => 1_BATTLEFIELD_SERVER
976
		[206] => 2CPU_150CT_PIM
977
		[207] => 2CPU_80CT_PIM
978
		[208] => ADDONVMM-HMP-L-M
979
		[209] => UNLIMITED_USERS
980
		[210] => 4CPU_30CT_PIM
981
		[211] => PLESK_POWER_PACK_FOR_WIN_FOR_VZ
982
		[212] => 8CPU_300CT_PVA
983
		[213] => 5_USERS
984
		[214] => 4CPU_150CT_PIM
985
		[215] => 10_BATTLEFIELD_SERVERS
986
		[216] => ADDON-WPB-100-M
987
		[217] => 8CPU_3HV_PVA
988
		[218] => ADDON-WPB-2500-M
989
		[219] => 5_LANGUAGE_PACKS_FOR_VZ
990
		[220] => 5_BATTLEFIELD_SERVERS
991
		[221] => DISABLE_GOOGLE_TOOLS
992
		[222] => 500_EXT_WHITELABEL
993
		[223] => UNLIMITED_DOMAINS_FOR_VZ
994
		[224] => SB10X-15000
995
		[225] => UNLIMITED_MAILBOXES_FOR_VZ
996
		[226] => 2CPU_5HV_PVA
997
		[227] => PLESK_7X_FOR_WIN_POWER_PACK
998
		[228] => PLESK-1000-SITES
999
		[229] => DISABLE_FEATURE_UPGRADES
1000
		[230] => SB10X-20000
1001
		[231] => ENTRY
1002
		[232] => 2CPU_6HV_PVA
1003
		[233] => 8CPU_30CT_PVA
1004
		[234] => UO-UNL-W-1Y
1005
		[235] => 2_LANGUAGE_PACKS
1006
		[236] => 8CPU_UNLIMITEDVC_PVA
1007
		[237] => 100_DOMAINS
1008
		[238] => 8CPU_20CT_PVA
1009
		[239] => 2CPU_3HV_PVA
1010
		[240] => ADD_1_MANAGED_MSSQL
1011
		[241] => 100_EXT
1012
		[242] => 100_EXTENSIONS_FOR_VZ
1013
		[243] => ADDON-WPB-500-M
1014
		[244] => 8CPU_3CT_PVA
1015
		[245] => 2CPU_9HV_PVA
1016
		[246] => 1_LANGUAGE_PACK_FOR_VMM
1017
		[247] => 8CPU_10CT_PVA
1018
		[248] => 2CPU_15HV_PVA
1019
		[249] => 2CPU_8HV_PVA
1020
		[250] => STARTER
1021
		[251] => ADDONVMM-HMP-W-M
1022
		[252] => 7500_SITES
1023
		[253] => 4CPU_40CT_PIM
1024
		[254] => SB10X-30000
1025
		[255] => PROFESSIONAL
1026
		[256] => 1000_SITES
1027
		[257] => 8CPU_350CT_PVA
1028
		[258] => 2CPU_60CT_PIM
1029
		[259] => HSPHERE_200_ACCOUNTS
1030
		[260] => 8CPU_500CT_PVA
1031
		[261] => SB10X-10000
1032
		[262] => STH-WMP-BSC-M
1033
		[263] => ADDON-WPB-25000-M
1034
		)
1035
1036
		[resultDesc] => Key types available: GLOBAL_MENTORING_LIVE_EXPERT_STANDARD_CARE, PSBM_45_SPE, PLESK-10-AND-LATER-FOR-VMM, PLESK_ANTIVIRUS_BY_KAV_FOR_WIN_FOR_VZ, PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-M, MYLITTLEADMIN_2000, MYLITTLEADMIN_2005, PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN, CRT-5-UNL-L, GLOBAL_MENTORING_TOTAL_CARE, LINUXMAGIC_MAGICSPAM, PLESK_ANTIVIRUS_BY_KAV_FOR_VZ, PINNACLE_CART_ECOMMERCE_SHOPPING_CART, SYMANTEC_NORTON_INTERNET_SECURITY_10SEATS_MONTHLY, ATI_PRO_FOR_WIN, STOPTHEHACKER-M, PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN_FOR_VZ, SB10X-PA, ATI_PRO, CRT-30-UNL-L, 4PSA_VOIPNOW_25_PROFESSIONAL, CLOUDLINUX-L-M, ATMAIL_WEBMAIL, PLESK_10_AND_LATER_FOR_WIN, CRT-5-100-L, PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-1Y, UNITY-ONE-W-M, PLESK-10-AND-LATER-FOR-WIN-FOR-VMM, GLOBAL_MENTORING_LIVE_EXPERT_BASIC, CRT-50-UNL-L, VIRTUOZZO_CONTAINERS_4, PARALLELS_PREMIUM_ANTIVIRUS_FOR_VZ, PLESK_10_AND_LATER_FOR_VZ, PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-M, CRT-50-100-L, UNITY-ONE-L-M, PLESK_ANTIVIRUS_BY_DRWEB, SYMANTEC_NORTON_INTERNET_SECURITY_MONTHLY, CRT-100-UNL-L, PARALLELS-CLOUD-SERVER, PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-1Y, CRT-100-100-L, PLESK_10_AND_LATER_FOR_WIN_FOR_VZ, PPA-L-M, PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN, PARALLELS-PREMIUM-ANTIVIRUS-FOR-VMM, PLESK_ANTIVIRUS_BY_KAV_FOR_WIN, PLESK_ANTIVIRUS_BY_DRWEB_FOR_VZ, SYMANTEC_NORTON_INTERNET_SECURITY_5SEATS_MONTHLY, UNITY_MOBILE, PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN_FOR_VZ, SB10X, UNITY_MOBILE_FOR_WIN, PARALLELS-CLOUD-STORAGE, CRT-30-100-L, CLOUDFLARE-M, VIRTUOZZO_CONTAINERS_4_FOR_WIN, PLESK_10_AND_LATER, PARALLELS_PREMIUM_ANTIVIRUS, SYMANTEC_NORTON_INTERNET_SECURITY_3SEATS_MONTHLY, PLESK_ANTIVIRUS_BY_KAV, KEEPIT_ONLINE_BACKUP. Features available: ADDON-CT-OAS-L-1Y, ADDON-HMP-L-M, SB10X-500, ADDON-WPB-12500-M, MEDIUM, 30_DOMAINS_FOR_VZ, PLESK-100-SITES, SB10X-35000, STORE_BUTTON_OFF, 2CPU_90CT_PIM, 4CPU_1CT_PIM, SB10X-300, SB10X-25000, 3_LANGUAGE_PACKS_FOR_VMM, UNLIMITED_DOMAINS_1000_BILLING_ACCOUNTS_100_SITES_FOR_VZ, 8CPU_15HV_PVA, ADDITIONAL_LANGUAGE_PACK, SB10X-100, 4CPU_UNLIMITEDVC_PVA, PLESK_SWSOFT_SERVICES_OFF, 8CPU_100CT_PVA, PLESK_POWER_PACK_FOR_VMM, 4CPU_20CT_PIM, PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VMM, HSPHERE_7500_ACCOUNTS, CLDF-PLUS-M, 7500_SITES_MULTI_SERVER, 4-LANGUAGE-PACKS-FOR-PPA, MONTHLY_AMPS, 300_SITES, UO-UNL-L-1Y, 2CPU_20CT_PIM, 8CPU_6HV_PVA, 4_LANGUAGE_PACKS, 8CPU_40CT_PVA, 8CPU_1CT_PVA, 2CPU_4HV_PVA, 8CPU_200CT_PVA, 4CPU_60CT_PIM, 100_EXT_WHITELABEL, 8CPU_50CT_PVA, PLESK-UNLIMITED-PB-ACCOUNTS, SB10X-40000, PLESK_HOSTING_SUITE_FOR_VZ, HSPHERE_3750_ACCOUNTS, 2CPU_7HV_PVA, 4CPU_5CT_PIM, UNLIMITED_USERS_FOR_VPS, PLESK-100-SITES-FOR-VZ, PLESK_RELOADED_FOR_VZ_POWER_PACK, 8CPU_10HV_PVA, ADDONVZ-CT-OAS-L-1Y, PLESK_7X_FOR_WIN_FOR_VZ_POWER_PACK, SB10X-2500, 2CPU_3CT_PIM, ADDITIONAL_LANGUAGE_PACK_FOR_VZ, 8CPU_80CT_PVA, 4CPU_30VC_PVA, 1000_SITES_MULTI_SERVER, 1_UNITY_MOBILE_SITE, 2CPU_40CT_PIM, EXTRAS_BUTTONS_OFF, UNLIMITED_DOMAINS_FOR_VMM, 8CPU_450CT_PVA, HSPHERE_500_ACCOUNTS, 4CPU_5VC_PVA, HSPHERE_1750_ACCOUNTS, FOTOLIA_OFF, SB10X-50000, HSPHERE_1000_ACCOUNTS, 1000_EXT, SB10X-7500, 100_EXTENSIONS, 2CPU_1CT_PIM, 1000_EXT_WHITELABEL, 8CPU_9HV_PVA, UO-1-L-1Y, 8CPU_5VC_PVA, 8CPU_8HV_PVA, 4_LANGUAGE_PACKS_FOR_VZ, 4CPU_70CT_PIM, 30_DOMAINS, 2_LANGUAGE_PACKS_FOR_VMM, ADDON-CT-OAS-L-M, UO-1-W-M, UNLIMITED-LANGUAGE-PACKS-FOR-PPA, 100_DOMAINS_FOR_VZ, ADDON-WPB-1000-M, STH-WMP-BUSP-M, UNLIMITED_DOMAINS, 2CPU_100CT_PIM, ADDONVZ-HMP-W-M, DISABLE_SITEBUILDER, 8CPU_1CT, HSPHERE_2500_ACCOUNTS, STH-WMP-BUS-M, PLESK_POWER_PACK_FOR_WIN, 8CPU_30VC_PVA, 8CPU_150CT_PVA, HSPHERE_5000_ACCOUNTS, 4CPU_90CT_PIM, PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VZ, ADDON-WPB-45000-M, PLESK_POWER_PACK_FOR_VZ, 8CPU_250CT_PVA, 1-LANGUAGE-PACK-FOR-PPA, UO-UNL-W-M, 2CPU_5VC_PVA, ADDON-WPB-15000-M, PLESK_RELOADED_POWER_PACK, ADDON-WPB-7500-M, PLESK-1000-SITES-FOR-VZ, 10_UNITY_MOBILE_SITES, 8CPU_70CT_PVA, UNLIMITED_MAILBOXES, STH-WMP-PRO-M, SB10X-45000, 8CPU_1HV_PVA, NEWSFEED_OFF, 4CPU_80CT_PIM, UO-1-W-1Y, 10000_SITES_MULTI_SERVER, 8CPU_UNLIMITEDHV_PVA, 2_BATTLEFIELD_SERVERS, CLNX-M, 8CPU_60CT_PVA, 100_SITES_MULTI_SERVER, 2CPU_UNLIMITEDVC_PVA, 2CPU_UNLIMITED_HV_PVA, 10_EXT_WHITELABEL, REINSTATE_SUS, ADDONVZ-HMP-L-M, UO-1-L-M, 8CPU_5CT_PVA, 4CPU_100CT_PIM, SB10X-1000, ADDON-WPB-5000-M, 2CPU_5CT_PIM, 10_EXT, 5_UNITY_MOBILE_SITES, 4CPU_200CT_PIM, ADDON-WPB-40000-M, ADDON-WPB-30000-M, 5-LANGUAGE-PACKS-FOR-PPA, 3-LANGUAGE-PACKS-FOR-PPA, PCS-RKU, ADDONVZ-CT-OAS-L-M, 2-LANGUAGE-PACKS-FOR-PPA, 3_LANGUAGE_PACKS_FOR_VZ, 2CPU_30CT_PIM, ENTERPRISE, 2CPU_50CT_PIM, ADDON-HMP-W-M, 2_LANGUAGE_PACKS_FOR_VZ, 4_LANGUAGE_PACKS_FOR_VMM, UO-UNL-L-M, SB10X-12500, 4CPU_50CT_PIM, ADDON-WPB-20000-M, HSPHERE_10000_ACCOUNTS, 4CPU_3CT_PIM, 3_LANGUAGE_PACKS, 8CPU_90CT_PVA, 5000_SITES, 100_SITES, PLESK_POWER_PACK, 8CPU_400CT_PVA, 500_EXT, 5000_SITES_MULTI_SERVER, 5_LANGUAGE_PACKS_FOR_VMM, UNLIMITED_BATTLEFIELD_SERVERS, ADDON-WPB-35000-M, PLESK-100-SITES-FOR-VMM, ADDON-WPB-50000-M, 8CPU_4HV_PVA, 8CPU_5HV_PVA, 2CPU_10HV_PVA, ADDON-WPB-300-M, 2CPU_2HV_PVA, 300_SITES_MULTI_SERVER, 10_DOMAINS_FOR_VZ, 1_LANGUAGE_PACK, 4CPU_10CT_PIM, ADDON-WPB-700-M, 2CPU_30VC_PVA, 2CPU_1HV_PVA, 5_USERS_FOR_VPS, 2CPU_10CT_PIM, 500_SITES_MULTI_SERVER, 300_DOMAINS, 10000_SITES, 8CPU_2HV_PVA, ADDON-WPB-10000-M, PLESK_POWER_PACK_FOR_WIN_FOR_VMM, PLESK-1000-SITES-FOR-VMM, 5_LANGUAGE_PACKS, 1_LANGUAGE_PACK_FOR_VZ, 2CPU_200CT_PIM, VIRTUOZZO_PROMO_OFF, SB10X-5000, 8CPU_7HV_PVA, 10_DOMAINS, PRO, 500_SITES, 2CPU_70CT_PIM, 1_BATTLEFIELD_SERVER, 2CPU_150CT_PIM, 2CPU_80CT_PIM, ADDONVMM-HMP-L-M, UNLIMITED_USERS, 4CPU_30CT_PIM, PLESK_POWER_PACK_FOR_WIN_FOR_VZ, 8CPU_300CT_PVA, 5_USERS, 4CPU_150CT_PIM, 10_BATTLEFIELD_SERVERS, ADDON-WPB-100-M, 8CPU_3HV_PVA, ADDON-WPB-2500-M, 5_LANGUAGE_PACKS_FOR_VZ, 5_BATTLEFIELD_SERVERS, DISABLE_GOOGLE_TOOLS, 500_EXT_WHITELABEL, UNLIMITED_DOMAINS_FOR_VZ, SB10X-15000, UNLIMITED_MAILBOXES_FOR_VZ, 2CPU_5HV_PVA, PLESK_7X_FOR_WIN_POWER_PACK, PLESK-1000-SITES, DISABLE_FEATURE_UPGRADES, SB10X-20000, ENTRY, 2CPU_6HV_PVA, 8CPU_30CT_PVA, UO-UNL-W-1Y, 2_LANGUAGE_PACKS, 8CPU_UNLIMITEDVC_PVA, 100_DOMAINS, 8CPU_20CT_PVA, 2CPU_3HV_PVA, ADD_1_MANAGED_MSSQL, 100_EXT, 100_EXTENSIONS_FOR_VZ, ADDON-WPB-500-M, 8CPU_3CT_PVA, 2CPU_9HV_PVA, 1_LANGUAGE_PACK_FOR_VMM, 8CPU_10CT_PVA, 2CPU_15HV_PVA, 2CPU_8HV_PVA, STARTER, ADDONVMM-HMP-W-M, 7500_SITES, 4CPU_40CT_PIM, SB10X-30000, PROFESSIONAL, 1000_SITES, 8CPU_350CT_PVA, 2CPU_60CT_PIM, HSPHERE_200_ACCOUNTS, 8CPU_500CT_PVA, SB10X-10000, STH-WMP-BSC-M, ADDON-WPB-25000-M.
1037
		[keyTypes] => Array
1038
		(
1039
		[0] => GLOBAL_MENTORING_LIVE_EXPERT_STANDARD_CARE
1040
		[1] => PSBM_45_SPE
1041
		[2] => PLESK-10-AND-LATER-FOR-VMM
1042
		[3] => PLESK_ANTIVIRUS_BY_KAV_FOR_WIN_FOR_VZ
1043
		[4] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-M
1044
		[5] => MYLITTLEADMIN_2000
1045
		[6] => MYLITTLEADMIN_2005
1046
		[7] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN
1047
		[8] => CRT-5-UNL-L
1048
		[9] => GLOBAL_MENTORING_TOTAL_CARE
1049
		[10] => LINUXMAGIC_MAGICSPAM
1050
		[11] => PLESK_ANTIVIRUS_BY_KAV_FOR_VZ
1051
		[12] => PINNACLE_CART_ECOMMERCE_SHOPPING_CART
1052
		[13] => SYMANTEC_NORTON_INTERNET_SECURITY_10SEATS_MONTHLY
1053
		[14] => ATI_PRO_FOR_WIN
1054
		[15] => STOPTHEHACKER-M
1055
		[16] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN_FOR_VZ
1056
		[17] => SB10X-PA
1057
		[18] => ATI_PRO
1058
		[19] => CRT-30-UNL-L
1059
		[20] => 4PSA_VOIPNOW_25_PROFESSIONAL
1060
		[21] => CLOUDLINUX-L-M
1061
		[22] => ATMAIL_WEBMAIL
1062
		[23] => PLESK_10_AND_LATER_FOR_WIN
1063
		[24] => CRT-5-100-L
1064
		[25] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-1Y
1065
		[26] => UNITY-ONE-W-M
1066
		[27] => PLESK-10-AND-LATER-FOR-WIN-FOR-VMM
1067
		[28] => GLOBAL_MENTORING_LIVE_EXPERT_BASIC
1068
		[29] => CRT-50-UNL-L
1069
		[30] => VIRTUOZZO_CONTAINERS_4
1070
		[31] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_VZ
1071
		[32] => PLESK_10_AND_LATER_FOR_VZ
1072
		[33] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-M
1073
		[34] => CRT-50-100-L
1074
		[35] => UNITY-ONE-L-M
1075
		[36] => PLESK_ANTIVIRUS_BY_DRWEB
1076
		[37] => SYMANTEC_NORTON_INTERNET_SECURITY_MONTHLY
1077
		[38] => CRT-100-UNL-L
1078
		[39] => PARALLELS-CLOUD-SERVER
1079
		[40] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-1Y
1080
		[41] => CRT-100-100-L
1081
		[42] => PLESK_10_AND_LATER_FOR_WIN_FOR_VZ
1082
		[43] => PPA-L-M
1083
		[44] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN
1084
		[45] => PARALLELS-PREMIUM-ANTIVIRUS-FOR-VMM
1085
		[46] => PLESK_ANTIVIRUS_BY_KAV_FOR_WIN
1086
		[47] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_VZ
1087
		[48] => SYMANTEC_NORTON_INTERNET_SECURITY_5SEATS_MONTHLY
1088
		[49] => UNITY_MOBILE
1089
		[50] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN_FOR_VZ
1090
		[51] => SB10X
1091
		[52] => UNITY_MOBILE_FOR_WIN
1092
		[53] => PARALLELS-CLOUD-STORAGE
1093
		[54] => CRT-30-100-L
1094
		[55] => CLOUDFLARE-M
1095
		[56] => VIRTUOZZO_CONTAINERS_4_FOR_WIN
1096
		[57] => PLESK_10_AND_LATER
1097
		[58] => PARALLELS_PREMIUM_ANTIVIRUS
1098
		[59] => SYMANTEC_NORTON_INTERNET_SECURITY_3SEATS_MONTHLY
1099
		[60] => PLESK_ANTIVIRUS_BY_KAV
1100
		[61] => KEEPIT_ONLINE_BACKUP
1101
		)
1102
1103
		)
1104
		*/
1105
	}
1106
}
1107