Completed
Push — master ( 310a9d...927fb5 )
by Joe
01:50
created

Parallels::serverAddress()   B

Complexity

Conditions 5
Paths 4

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 30

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 10
ccs 0
cts 7
cp 0
rs 8.8571
cc 5
eloc 8
nc 4
nop 2
crap 30
1
<?php
2
/**
3
 * Parallels Functionality
4
 *
5
 * API Documentation at: .. ill fill this in later from forum posts
6
 *
7
 * Last Changed: $LastChangedDate: 2017-05-31 06:50:39 -0400 (Wed, 31 May 2017) $
8
 * @author detain
9
 * @version $Revision: 24936 $
10
 * @copyright 2017
11
 * @package MyAdmin
12
 * @category Licenses
13
 */
14
15
namespace Detain\Parallels;
16
17
/**
18
 * Parallels
19
 *
20
 * @access public
21
 */
22
class Parallels {
23
	public $licenseType = 'billing'; // billing or purchase
24
	private $xmlOptions = array('sslverify' => FALSE);
25
	private $defaultUrl = 'https://ka.parallels.com:7050/';
26
	private $defaultDemoUrl = 'https://kademo.parallels.com:7050/';
27
	public $url = '';
28
	public $response;
29
	private $client = '';
30
	private $login = '';
31
	private $password = '';
32
	public $xml;
33
34
	/**
35
	 * @param NULL|string $login api login, NULL(default) to use the PARALLELS_KA_LOGIN setting
36
	 * @param NULL|string $password api password, NULL(default) to use the PARALLELS_KA_PASSWORD setting
37
	 * @param NULL|string $client api client, NULL(default) to use the PARALLELS_KA_CLIENT setting
38
	 * @param bool $demo defaults to FALSE, whether or not to use the demo interface instae dof the normal one
39
	 * @param NULL|array $xmlOptions array of optoins ot pass to xmlrpc2 client
40
	 */
41
	public function __construct($login = NULL, $password = NULL, $client = NULL, $demo = FALSE, $xmlOptions = NULL) {
0 ignored issues
show
Coding Style introduced by
__construct uses the super-global variable $GLOBALS which is generally not recommended.

Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable:

// Bad
class Router
{
    public function generate($path)
    {
        return $_SERVER['HOST'].$path;
    }
}

// Better
class Router
{
    private $host;

    public function __construct($host)
    {
        $this->host = $host;
    }

    public function generate($path)
    {
        return $this->host.$path;
    }
}

class Controller
{
    public function myAction(Request $request)
    {
        // Instead of
        $page = isset($_GET['page']) ? intval($_GET['page']) : 1;

        // Better (assuming you use the Symfony2 request)
        $page = $request->query->get('page', 1);
    }
}
Loading history...
42
		if (is_null($login) && defined('PARALLELS_KA_LOGIN'))
43
			$this->login = constant('PARALLELS_KA_LOGIN');
44
		else
45
			$this->login = $login;
46
		if (is_null($password) && defined('PARALLELS_KA_PASSWORD'))
47
			$this->password = constant('PARALLELS_KA_PASSWORD');
48
		else
49
			$this->password = $password;
50
		if (!is_null($client))
51
			$this->client = $client;
52
		elseif (defined('PARALLELS_KA_CLIENT'))
53
			$this->client = constant('PARALLELS_KA_CLIENT');
54
		if ($demo === TRUE)
55
			$this->url = $this->defaultDemoUrl;
56
		elseif ($demo === FALSE)
57
			$this->url = $this->defaultUrl;
58
		else
59
			$this->url = $demo;
0 ignored issues
show
Documentation Bug introduced by
The property $url was declared of type string, but $demo is of type boolean. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
60
		if (!is_null($xmlOptions))
61
			$this->xmlOptions = $xmlOptions;
62
		if (!isset($GLOBALS['HTTP_RAW_POST_DATA']))
63
			$GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents('php://input');
64
		require_once('XML/RPC2/Client.php');
65
		$this->xml = \XML_RPC2_Client::create($this->url, $this->xmlOptions);
66
	}
67
68
	/**
69
	 * @return array
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use array<string,string>.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
70
	 */
71
	public function authInfo() {
72
		return array('login' => $this->login, 'password' => $this->password);
73
	}
74
75
	/**
76
	 * @param array $ips
77
	 * @param array $macs
78
	 * @return array
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use array<string,array>.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
79
	 */
80
	public function serverAddress($ips = array(), $macs = array()) {
81
		if (!is_array($ips) && $ips != '')
82
			$ips = array($ips);
83
		if (!is_array($macs) && $macs != '')
84
			$macs = array($macs);
85
		return array(
86
			'ips' => $ips,
87
			'macs' => $macs,
88
			);
89
	}
90
91
	/**
92
	 * @param $key
93
	 * @return mixed
94
	 */
95
	public function terminateKey($key) {
96
		$this->response = $this->xml->__call('partner10.terminateKey', array($this->authInfo(), $key));
97
		return $this->response;
98
	}
99
100
	/**
101
	 * @param $key
102
	 * @return mixed
103
	 */
104
	public function resetKey($key) {
105
		$this->response = $this->xml->__call('partner10.resetKey', array($this->authInfo(), $key));
106
		return $this->response;
107
	}
108
109
	/**
110
	 * @param $key
111
	 * @return mixed
112
	 */
113
	public function activateKey($key) {
114
		$this->response = $this->xml->__call('partner10.activateKey', array($this->authInfo(), $key));
115
		return $this->response;
116
	}
117
118
	/**
119
	 * @param $key
120
	 * @param $note
121
	 * @return mixed
122
	 */
123
	public function addNoteToKey($key, $note) {
124
		$this->response = $this->xml->__call('partner10.addNoteToKey', array($this->authInfo(), $key, $note));
125
		return $this->response;
126
	}
127
128
	/**
129
	 * @param      $key
130
	 * @param bool $email
131
	 * @return mixed
132
	 */
133
	public function sendKeyByEmail($key, $email = FALSE) {
134
		if ($email === FALSE)
135
			$this->response = $this->xml->__call('partner10.sendKeyByEmail', array($this->authInfo(), $key));
136
		else
137
			$this->response = $this->xml->__call('partner10.sendKeyByEmail', array($this->authInfo(), $key, $email));
138
		return $this->response;
139
	}
140
141
	/**
142
	 * @param       $keyType
143
	 * @param array $upgradePlans
144
	 * @param array $ips
145
	 * @param array $macs
146
	 * @param bool  $licenseType
147
	 * @param bool  $client
148
	 * @return mixed
149
	 */
150
	public function createKey($keyType, $upgradePlans = array(), $ips = array(), $macs = array(), $licenseType = FALSE, $client = FALSE) {
151
		if (!is_array($ips) && $ips != '')
152
			$ips = array($ips);
153
		$this->response = $this->xml->__call('partner10.createKey', array(
154
			$this->authInfo(),
155
			$this->serverAddress($ips, $macs),
156
			($client === FALSE ? $this->client : $client),
157
			$keyType,
158
			$upgradePlans,
159
			($licenseType === FALSE ? $this->LicenseType : $licenseType)));
0 ignored issues
show
Bug introduced by
The property LicenseType does not seem to exist. Did you mean licenseType?

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
160
		return $this->response;
161
		/* Success:
0 ignored issues
show
Unused Code Comprehensibility introduced by
41% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
162
		Array
163
		(
164
		[mainKeyNumber] => PLSK.00004266.0000
165
		[expirationDate] => stdClass Object
166
		(
167
		[scalar] => 20131209T00:00:00
168
		[xmlrpc_type] => datetime
169
		[timestamp] => 1386547200
170
		)
171
172
		[productKey] => DETAIN-2TVB02-ZT1R57-AY2442-6WN966
173
		[additionalKeysNumbers] => Array
174
		(
175
		)
176
177
		[resultCode] => 100
178
		[resultDesc] => PLSK.00004266.0000 has been successfully created.
179
		[updateDate] => stdClass Object
180
		(
181
		[scalar] => 20131129T00:00:00
182
		[xmlrpc_type] => datetime
183
		[timestamp] => 1385683200
184
		)
185
186
		)
187
		*/
188
	}
189
190
	/**
191
	 * @param $key
192
	 * @return mixed
193
	 */
194
	public function retrieveKey($key) {
195
		$this->response = $this->xml->__call('partner10.retrieveKey', array($this->authInfo(), $key));
196
		return $this->response;
197
		/* Success
198
		Array
199
		(
200
		[keyExtension] => xml
201
		[resultCode] => 100
202
		[resultDesc] => PLSK.00005819.0000 has been successfully retrieved
203
		[keyNumber] => PLSK.00005819.0000
204
		[key] => stdClass Object
205
		(
206
		[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">
207
		<!--Unique product Key number-->
208
		<core:key-number core:type="string">PLSK.00005819</core:key-number>
209
		<!--Key version-->
210
		<core:key-version core:type="string">0000</core:key-version>
211
		<!--Key description-->
212
		<core:description>
213
		<core:keytype>Parallels Plesk Panel 10.x/11.x and Later for Windows</core:keytype>
214
		<core:feature>Unlimited Domains w/1 yr SUS</core:feature>
215
		<core:feature>Parallels Web Presence Builder - 100 Sites</core:feature>
216
		<core:feature>Parallels PowerPack for Plesk (Windows)</core:feature>
217
		</core:description>
218
		<!--Product which this license is intended to work on-->
219
		<core:product core:type="string">plesk-win</core:product>
220
		<!--Supported product version-->
221
		<core:versions>
222
		<core:from core:type="string">10.0</core:from>
223
		<core:to core:type="string">any</core:to>
224
		</core:versions>
225
		<!--Date after which this license becomes usable (inclusive)-->
226
		<core:start-date core:type="date">instant</core:start-date>
227
		<!--Date before which this license is usable (exclusive)-->
228
		<core:expiration-date core:type="date">2013-12-02</core:expiration-date>
229
		<!--URL of the service endpoint to use when performing an autoupdate-->
230
		<core:license-server-url core:type="string">https://ka.parallels.com:5224/xmlrpc</core:license-server-url>
231
		<!--Date when product will try to perform an autoupdate-->
232
		<core:update-date core:type="date">2013-11-22</core:update-date>
233
		<core:update-ticket core:hidden="true" core:type="string">k0uj75wmlfa1a5hwmk-k43gy2ji0p2y1</core:update-ticket>
234
		<!--Number of domains-->
235
		<plesk-windows:domains core:type="integer">unlimited</plesk-windows:domains>
236
		<!--Number of clients-->
237
		<plesk-windows:clients core:type="integer">unlimited</plesk-windows:clients>
238
		<!--Number of webusers-->
239
		<plesk-windows:webusers core:type="integer">unlimited</plesk-windows:webusers>
240
		<!--Number of mailnames-->
241
		<plesk-windows:mailnames core:type="integer">unlimited</plesk-windows:mailnames>
242
		<!--Number of additional language pack(s)-->
243
		<plesk-windows:language-packs core:type="integer">0</plesk-windows:language-packs>
244
		<plesk-windows:mpc-id core:hidden="true" core:type="integer">0</plesk-windows:mpc-id>
245
		<plesk-windows:mpc-disabled core:hidden="true" core:type="boolean">false</plesk-windows:mpc-disabled>
246
		<!--Google tools-->
247
		<plesk-windows:google-tools core:type="boolean">true</plesk-windows:google-tools>
248
		<plesk-windows:mpc-mng-disabled core:hidden="true" core:type="boolean">false</plesk-windows:mpc-mng-disabled>
249
		<!--Number of slaves-->
250
		<plesk-windows:slaves core:type="integer">0</plesk-windows:slaves>
251
		<!--EventManager-->
252
		<plesk-windows:event-manager core:type="boolean">true</plesk-windows:event-manager>
253
		<!--Domains backup-->
254
		<plesk-windows:domains-backup core:type="boolean">true</plesk-windows:domains-backup>
255
		<!--Tomcat support-->
256
		<plesk-windows:tomcat-support core:type="boolean">true</plesk-windows:tomcat-support>
257
		<!--Subdomains-->
258
		<plesk-windows:subdomains-support core:type="boolean">true</plesk-windows:subdomains-support>
259
		<!--Backward key compatibility restriction-->
260
		<plesk-windows:backward-restriction core:type="integer">0</plesk-windows:backward-restriction>
261
		<!--Work Inside Virtuozzo-->
262
		<plesk-windows:vps-only core:type="boolean">false</plesk-windows:vps-only>
263
		<!--Work Inside Hyper-V-->
264
		<plesk-windows:hyper-v core:type="boolean">false</plesk-windows:hyper-v>
265
		<!--Work Inside VMware-->
266
		<plesk-windows:vmware core:type="boolean">false</plesk-windows:vmware>
267
		<!--Work Inside Xen-->
268
		<plesk-windows:xen core:type="boolean">false</plesk-windows:xen>
269
		<!--Work Inside KVM-->
270
		<plesk-windows:kvm core:type="boolean">false</plesk-windows:kvm>
271
		<!--Work Inside Parallels Hypervisor-->
272
		<plesk-windows:hypervisor core:type="boolean">false</plesk-windows:hypervisor>
273
		<!--Global changes-->
274
		<plesk-windows:global-changes core:type="boolean">true</plesk-windows:global-changes>
275
		<!--Shell access-->
276
		<plesk-windows:shell-access core:type="boolean">true</plesk-windows:shell-access>
277
		<!--Detailed traffic-->
278
		<plesk-windows:detailed-traffic core:type="boolean">true</plesk-windows:detailed-traffic>
279
		<!--Notification manager-->
280
		<plesk-windows:notification-manager core:type="boolean">true</plesk-windows:notification-manager>
281
		<!--Action log manager-->
282
		<plesk-windows:action-manager core:type="boolean">true</plesk-windows:action-manager>
283
		<!--Clients and Domains Expirations management-->
284
		<plesk-windows:expirations-manager core:type="boolean">true</plesk-windows:expirations-manager>
285
		<!--Client templates-->
286
		<plesk-windows:client-templates core:type="boolean">true</plesk-windows:client-templates>
287
		<!--Ability to use Application Vault-->
288
		<plesk-windows:appvault-support core:type="boolean">true</plesk-windows:appvault-support>
289
		<!--Ability to use SpamAssassin-->
290
		<plesk-windows:spamassasin-support core:type="boolean">true</plesk-windows:spamassasin-support>
291
		<!--Ability to use Trouble Ticketing System-->
292
		<plesk-windows:tts-support core:type="boolean">true</plesk-windows:tts-support>
293
		<!--Ability to use ColdFusion-->
294
		<plesk-windows:coldfusion-support core:type="boolean">true</plesk-windows:coldfusion-support>
295
		<plesk-windows:ask-update core:hidden="true" core:type="boolean">false</plesk-windows:ask-update>
296
		<plesk-windows:autoinstaller-config core:hidden="true" core:type="string">true</plesk-windows:autoinstaller-config>
297
		<!--Ability to use DrWeb-->
298
		<plesk-windows:drweb-support core:type="boolean">true</plesk-windows:drweb-support>
299
		<plesk-windows:store-id core:hidden="true" core:type="integer">1</plesk-windows:store-id>
300
		<!--Ability to use Migration Manager-->
301
		<plesk-windows:migration-manager core:type="boolean">true</plesk-windows:migration-manager>
302
		<!--Ability to use MS SQL-->
303
		<plesk-windows:mssql core:type="boolean">true</plesk-windows:mssql>
304
		<!--Allowed locales-->
305
		<plesk-windows:allowed-locales core:type="string">any</plesk-windows:allowed-locales>
306
		<!--Allows feature upgrades for this version-->
307
		<plesk-windows:feature-upgrades core:type="boolean">true</plesk-windows:feature-upgrades>
308
		<!--Parallels Plesk Billing accounts count-->
309
		<plesk-windows:modernbill-accounts core:type="integer">0</plesk-windows:modernbill-accounts>
310
		<!--Number of sites-->
311
		<plesk-windows:sitebuilder-sites core:type="integer">100</plesk-windows:sitebuilder-sites>
312
		<!--Enable Parallels Plesk Mobile Server Manager-->
313
		<plesk-windows:mobile-server-manager-support core:type="boolean">true</plesk-windows:mobile-server-manager-support>
314
		<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
315
		<ds:SignedInfo>
316
		<ds:CanonicalizationMethod Algorithm="http://parallels.com/schemas/keys/core/3#canonicalize"/>
317
		<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
318
		<ds:Reference URI="">
319
		<ds:Transforms>
320
		<ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
321
		<ds:Transform Algorithm="http://parallels.com/schemas/keys/core/3#transform"/>
322
		</ds:Transforms>
323
		<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
324
		<ds:DigestValue>ENCODED HASH HERE</ds:DigestValue>
325
		</ds:Reference>
326
		</ds:SignedInfo>
327
		<ds:SignatureValue>
328
		ENCODED DATA HERE
329
		</ds:SignatureValue>
330
		<ds:KeyInfo>
331
		<ds:X509Data>
332
		<ds:X509Certificate>
333
		ENCODED DATA HERE
334
		</ds:X509Certificate>
335
		</ds:X509Data>
336
		</ds:KeyInfo>
337
		</ds:Signature>
338
		</plesk-windows:key>
339
340
		[xmlrpc_type] => base64
341
		)
342
343
		)
344
345
		*/
346
	}
347
348
	/**
349
	 * 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:
350
	 * 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
351
	 *
352
	 * @param $key
353
	 * @return mixed
354
	 */
355
	public function getAvailableUpgrades($key) {
356
		$this->response = $this->xml->__call('partner10.getAvailableUpgrades', array($this->authInfo(), $key));
357
		return $this->response;
358
	}
359
360
	/**
361
	 * Success
362
	 * Array
363
	 * (
364
	 * [keyInfo] => Array
365
	 * (
366
	 * [expirationDate] => stdClass Object
367
	 * (
368
	 * [scalar] => 20131202T00:00:00
369
	 * [xmlrpc_type] => datetime
370
	 * [timestamp] => 1385942400
371
	 * )
372
	 * )
373
	 * [features] => Array
374
	 * (
375
	 * [0] => Array
376
	 * (
377
	 * [apiName] => PLESK_7X_FOR_WIN_POWER_PACK
378
	 * [name] => Parallels PowerPack for Plesk (Windows) (Monthly Lease)
379
	 * )
380
	 * [1] => Array
381
	 * (
382
	 * [apiName] => PLESK-100-SITES
383
	 * [name] => Parallels Web Presence Builder - 100 Sites (Monthly Lease)
384
	 * )
385
	 * [2] => Array
386
	 * (
387
	 * [apiName] => UNLIMITED_DOMAINS
388
	 * [name] => Unlimited Domains w/1 yr SUS (Lease)
389
	 * )
390
	 * )
391
	 * [billingType] => LEASE
392
	 * [productFamily] => plesk
393
	 * [createDate] => stdClass Object
394
	 * (
395
	 * [scalar] => 20131023T18:02:11
396
	 * [xmlrpc_type] => datetime
397
	 * [timestamp] => 1382551331
398
	 * )
399
	 * [trial] =>
400
	 * [lastReportingDate] => stdClass Object
401
	 * (
402
	 * [scalar] => 20131029T06:27:31
403
	 * [xmlrpc_type] => datetime
404
	 * [timestamp] => 1383028051
405
	 * )
406
	 * [additionalKeys] => Array
407
	 * (
408
	 * [0] => Array
409
	 * (
410
	 * [expirationDate] => stdClass Object
411
	 * (
412
	 * [scalar] => 20131202T00:00:00
413
	 * [xmlrpc_type] => datetime
414
	 * [timestamp] => 1385942400
415
	 * )
416
	 * [lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
417
	 * [apiKeyType] => N/A
418
	 * [boundIPAddress] =>
419
	 * [problem] =>
420
	 * [keyNumber] => KAV.00005821.0001
421
	 * [properties] => Array
422
	 * (
423
	 * )
424
	 * [type] => ADDITIONAL
425
	 * [updateDate] => stdClass Object
426
	 * (
427
	 * [scalar] => 20131122T00:00:00
428
	 * [xmlrpc_type] => datetime
429
	 * [timestamp] => 1385078400
430
	 * )
431
	 * [clientId] => 19282468
432
	 * [parentKeyNumber] => PLSK.00005819.0000
433
	 * [lastReportingVersion] => 11.5.3
434
	 * [keyType] => Parallels Plesk Panel Antivirus Powered by Kaspersky, 5 Mailboxes (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
435
	 * [terminated] =>
436
	 * [susAndSupportInfo] => Array
437
	 * (
438
	 * )
439
	 * [features] => Array
440
	 * (
441
	 * )
442
	 * [billingType] => LEASE
443
	 * [productFamily] => kav
444
	 * [createDate] => stdClass Object
445
	 * (
446
	 * [scalar] => 20131023T18:02:12
447
	 * [xmlrpc_type] => datetime
448
	 * [timestamp] => 1382551332
449
	 * )
450
	 * [trial] =>
451
	 * [lastReportingDate] => stdClass Object
452
	 * (
453
	 * [scalar] => 20131023T18:05:24
454
	 * [xmlrpc_type] => datetime
455
	 * [timestamp] => 1382551524
456
	 * )
457
	 * [additionalKeys] => Array
458
	 * (
459
	 * )
460
	 * )
461
	 * [1] => Array
462
	 * (
463
	 * [expirationDate] => stdClass Object
464
	 * (
465
	 * [scalar] => 20131202T00:00:00
466
	 * [xmlrpc_type] => datetime
467
	 * [timestamp] => 1385942400
468
	 * )
469
	 * [lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
470
	 * [apiKeyType] => N/A
471
	 * [boundIPAddress] =>
472
	 * [problem] =>
473
	 * [keyNumber] => APS.00005820.0001
474
	 * [properties] => Array
475
	 * (
476
	 * )
477
	 * [type] => ADDITIONAL
478
	 * [updateDate] => stdClass Object
479
	 * (
480
	 * [scalar] => 20131122T00:00:00
481
	 * [xmlrpc_type] => datetime
482
	 * [timestamp] => 1385078400
483
	 * )
484
	 * [clientId] => 19282468
485
	 * [parentKeyNumber] => PLSK.00005819.0000
486
	 * [lastReportingVersion] => 11.5.3
487
	 * [keyType] => UNITY One, 2 Domains (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
488
	 * [terminated] =>
489
	 * [susAndSupportInfo] => Array
490
	 * (
491
	 * )
492
	 * [features] => Array
493
	 * (
494
	 * )
495
	 * [billingType] => LEASE
496
	 * [productFamily] => unity-one
497
	 * [createDate] => stdClass Object
498
	 * (
499
	 * [scalar] => 20131023T18:02:11
500
	 * [xmlrpc_type] => datetime
501
	 * [timestamp] => 1382551331
502
	 * )
503
	 * [trial] =>
504
	 * [lastReportingDate] => stdClass Object
505
	 * (
506
	 * [scalar] => 20131023T18:05:26
507
	 * [xmlrpc_type] => datetime
508
	 * [timestamp] => 1382551526
509
	 * )
510
	 * [additionalKeys] => Array
511
	 * (
512
	 * )
513
	 * )
514
	 * )
515
	 * )
516
	 *[resultCode] => 100
517
	 * [resultDesc] => Key info for PLSK.00005819.0000 key returned successfully
518
	 * [keyNumber] => PLSK.00005819.0000
519
	 * )
520
	 *
521
	 * @param $key
522
	 * @return mixed
523
	 */
524
	public function getKeyInfo($key) {
525
		$this->response = $this->xml->__call('partner10.getKeyInfo', array($this->authInfo(), $key));
526
		return $this->response;
527
	}
528
529
	/**
530
	 * @param string $ipAddress the ip address
531
	 * @return false|string false if no key , or a string w/ the key
532
	 */
533
	public function getMainKeyFromIp($ipAddress) {
534
		$response = $this->getKeyNumbers($ipAddress);
0 ignored issues
show
Documentation introduced by
$ipAddress is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
535
		//$response = $this->getKeysInfoByIP($ipAddress);
0 ignored issues
show
Unused Code Comprehensibility introduced by
64% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
536
		$return = FALSE;
537
		if (isset($response['keyInfos'])) {
538
			$responseValues = array_values($response['keyInfos']);
539
			foreach ($responseValues as $data) {
540
				if ($return === FALSE)
541
					$return = $data['keyNumber'];
542
				if ($data['type'] == 'MAIN')
543
					$return = $data['keyNumber'];
544
			}
545
			return $return;
546
		} else
547
			return FALSE;
548
	}
549
550
	/**
551
	 * @param $ipAddress
552
	 * @return mixed
553
	 */
554
	public function getKeysInfoByIP($ipAddress) {
555
		$this->response = $this->xml->__call('partner10.getKeysInfoByIP', array($this->authInfo(), $ipAddress));
556
		return $this->response;
557
	}
558
559
	/**
560
	 * @param array $ips
561
	 * @param array $macs
562
	 * @return mixed
563
	 */
564
	public function getKeyNumbers($ips = array(), $macs = array()) {
565
		myadmin_log('licenses', 'info', json_encode($this->serverAddress($ips, $macs)), __LINE__, __FILE__);
566
		$this->response = $this->xml->__call('partner10.getKeyNumbers', array($this->authInfo(), $this->serverAddress($ips, $macs)));
567
		return $this->response;
568
		/* Success
0 ignored issues
show
Unused Code Comprehensibility introduced by
47% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
569
		Array
570
		(
571
		[keyInfos] => Array
572
		(
573
		[0] => Array
574
		(
575
		[keyType] => Parallels Plesk Panel 10.x/11.x and Later for Windows for Virtual Machines (Lease)
576
		Lease)
577
		[lastReportingIp] => 206.72.205.242
578
		[terminated] => 1
579
		[keyNumber] => KAV.00004873.0002
580
		[billingType] => LEASE
581
		[type] => ADDITIONAL
582
		[createDate] => stdClass Object
583
		(
584
		[scalar] => 20131014T16:44:40
585
		[xmlrpc_type] => datetime
586
		[timestamp] => 1381769080
587
		)
588
589
		[lastReportingDate] => stdClass Object
590
		(
591
		[scalar] => 20131023T17:35:45
592
		[xmlrpc_type] => datetime
593
		[timestamp] => 1382549745
594
		)
595
596
		)
597
598
		[3] => Array
599
		(
600
		[keyType] => Parallels Plesk Panel 10.x/11.x and Later for Windows (Lease)
601
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
602
		[terminated] =>
603
		[keyNumber] => PLSK.00005819.0000
604
		[billingType] => LEASE
605
		[type] => MAIN
606
		[createDate] => stdClass Object
607
		(
608
		[scalar] => 20131023T18:02:11
609
		[xmlrpc_type] => datetime
610
		[timestamp] => 1382551331
611
		)
612
613
		[lastReportingDate] => stdClass Object
614
		(
615
		[scalar] => 20131029T06:27:31
616
		[xmlrpc_type] => datetime
617
		[timestamp] => 1383028051
618
		)
619
620
		)
621
622
		[4] => Array
623
		(
624
		[keyType] => UNITY One, 2 Domains (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
625
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
626
		[terminated] =>
627
		[keyNumber] => APS.00005820.0001
628
		[billingType] => LEASE
629
		[type] => ADDITIONAL
630
		[createDate] => stdClass Object
631
		(
632
		[scalar] => 20131023T18:02:11
633
		[xmlrpc_type] => datetime
634
		[timestamp] => 1382551331
635
		)
636
637
		[lastReportingDate] => stdClass Object
638
		(
639
		[scalar] => 20131023T18:05:26
640
		[xmlrpc_type] => datetime
641
		[timestamp] => 1382551526
642
		)
643
644
		)
645
646
		[5] => Array
647
		(
648
		[keyType] => Parallels Plesk Panel Antivirus Powered by Kaspersky, 5 Mailboxes (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
649
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
650
		[terminated] =>
651
		[keyNumber] => KAV.00005821.0001
652
		[billingType] => LEASE
653
		[type] => ADDITIONAL
654
		[createDate] => stdClass Object
655
		(
656
		[scalar] => 20131023T18:02:12
657
		[xmlrpc_type] => datetime
658
		[timestamp] => 1382551332
659
		)
660
661
		[lastReportingDate] => stdClass Object
662
		(
663
		[scalar] => 20131023T18:05:24
664
		[xmlrpc_type] => datetime
665
		[timestamp] => 1382551524
666
		)
667
668
		)
669
670
		)
671
672
		[resultCode] => 100
673
		[resultDesc] => Found: PLSK.02554871.0001, APS.02554872.0002, KAV.02554873.0002, PLSK.00005819.0000, APS.00005820.0001, KAV.00005821.0001
674
		[keyNumbers] => Array
675
		(
676
		[0] => PLSK.02554871.0001
677
		[1] => APS.02554872.0002
678
		[2] => KAV.02554873.0002
679
		[3] => PLSK.00005819.0000
680
		[4] => APS.00005820.0001
681
		[5] => KAV.00005821.0001
682
		)
683
684
		[detailResultCode] => 0
685
		)
686
		*/
687
	}
688
689
	/**
690
	 * @param bool $client
691
	 * @return mixed
692
	 */
693
	public function getAvailableKeyTypesAndFeatures($client = FALSE) {
694
		$this->response = $this->xml->__call('partner10.getAvailableKeyTypesAndFeatures', array($this->authInfo(), ($client === FALSE ? $this->client : $client)));
695
		return $this->response;
696
		/* My Output:
0 ignored issues
show
Unused Code Comprehensibility introduced by
42% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
697
		Array
698
		(
699
		[resultCode] => 100
700
		[features] => Array
701
		(
702
		[0] => ADDON-CT-OAS-L-1Y
703
		[1] => ADDON-HMP-L-M
704
		[2] => SB10X-500
705
		[3] => ADDON-WPB-12500-M
706
		[4] => MEDIUM
707
		[5] => 30_DOMAINS_FOR_VZ
708
		[6] => PLESK-100-SITES
709
		[7] => SB10X-35000
710
		[8] => STORE_BUTTON_OFF
711
		[9] => 2CPU_90CT_PIM
712
		[10] => 4CPU_1CT_PIM
713
		[11] => SB10X-300
714
		[12] => SB10X-25000
715
		[13] => 3_LANGUAGE_PACKS_FOR_VMM
716
		[14] => UNLIMITED_DOMAINS_1000_BILLING_ACCOUNTS_100_SITES_FOR_VZ
717
		[15] => 8CPU_15HV_PVA
718
		[16] => ADDITIONAL_LANGUAGE_PACK
719
		[17] => SB10X-100
720
		[18] => 4CPU_UNLIMITEDVC_PVA
721
		[19] => PLESK_SWSOFT_SERVICES_OFF
722
		[20] => 8CPU_100CT_PVA
723
		[21] => PLESK_POWER_PACK_FOR_VMM
724
		[22] => 4CPU_20CT_PIM
725
		[23] => PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VMM
726
		[24] => HSPHERE_7500_ACCOUNTS
727
		[25] => CLDF-PLUS-M
728
		[26] => 7500_SITES_MULTI_SERVER
729
		[27] => 4-LANGUAGE-PACKS-FOR-PPA
730
		[28] => MONTHLY_AMPS
731
		[29] => 300_SITES
732
		[30] => UO-UNL-L-1Y
733
		[31] => 2CPU_20CT_PIM
734
		[32] => 8CPU_6HV_PVA
735
		[33] => 4_LANGUAGE_PACKS
736
		[34] => 8CPU_40CT_PVA
737
		[35] => 8CPU_1CT_PVA
738
		[36] => 2CPU_4HV_PVA
739
		[37] => 8CPU_200CT_PVA
740
		[38] => 4CPU_60CT_PIM
741
		[39] => 100_EXT_WHITELABEL
742
		[40] => 8CPU_50CT_PVA
743
		[41] => PLESK-UNLIMITED-PB-ACCOUNTS
744
		[42] => SB10X-40000
745
		[43] => PLESK_HOSTING_SUITE_FOR_VZ
746
		[44] => HSPHERE_3750_ACCOUNTS
747
		[45] => 2CPU_7HV_PVA
748
		[46] => 4CPU_5CT_PIM
749
		[47] => UNLIMITED_USERS_FOR_VPS
750
		[48] => PLESK-100-SITES-FOR-VZ
751
		[49] => PLESK_RELOADED_FOR_VZ_POWER_PACK
752
		[50] => 8CPU_10HV_PVA
753
		[51] => ADDONVZ-CT-OAS-L-1Y
754
		[52] => PLESK_7X_FOR_WIN_FOR_VZ_POWER_PACK
755
		[53] => SB10X-2500
756
		[54] => 2CPU_3CT_PIM
757
		[55] => ADDITIONAL_LANGUAGE_PACK_FOR_VZ
758
		[56] => 8CPU_80CT_PVA
759
		[57] => 4CPU_30VC_PVA
760
		[58] => 1000_SITES_MULTI_SERVER
761
		[59] => 1_UNITY_MOBILE_SITE
762
		[60] => 2CPU_40CT_PIM
763
		[61] => EXTRAS_BUTTONS_OFF
764
		[62] => UNLIMITED_DOMAINS_FOR_VMM
765
		[63] => 8CPU_450CT_PVA
766
		[64] => HSPHERE_500_ACCOUNTS
767
		[65] => 4CPU_5VC_PVA
768
		[66] => HSPHERE_1750_ACCOUNTS
769
		[67] => FOTOLIA_OFF
770
		[68] => SB10X-50000
771
		[69] => HSPHERE_1000_ACCOUNTS
772
		[70] => 1000_EXT
773
		[71] => SB10X-7500
774
		[72] => 100_EXTENSIONS
775
		[73] => 2CPU_1CT_PIM
776
		[74] => 1000_EXT_WHITELABEL
777
		[75] => 8CPU_9HV_PVA
778
		[76] => UO-1-L-1Y
779
		[77] => 8CPU_5VC_PVA
780
		[78] => 8CPU_8HV_PVA
781
		[79] => 4_LANGUAGE_PACKS_FOR_VZ
782
		[80] => 4CPU_70CT_PIM
783
		[81] => 30_DOMAINS
784
		[82] => 2_LANGUAGE_PACKS_FOR_VMM
785
		[83] => ADDON-CT-OAS-L-M
786
		[84] => UO-1-W-M
787
		[85] => UNLIMITED-LANGUAGE-PACKS-FOR-PPA
788
		[86] => 100_DOMAINS_FOR_VZ
789
		[87] => ADDON-WPB-1000-M
790
		[88] => STH-WMP-BUSP-M
791
		[89] => UNLIMITED_DOMAINS
792
		[90] => 2CPU_100CT_PIM
793
		[91] => ADDONVZ-HMP-W-M
794
		[92] => DISABLE_SITEBUILDER
795
		[93] => 8CPU_1CT
796
		[94] => HSPHERE_2500_ACCOUNTS
797
		[95] => STH-WMP-BUS-M
798
		[96] => PLESK_POWER_PACK_FOR_WIN
799
		[97] => 8CPU_30VC_PVA
800
		[98] => 8CPU_150CT_PVA
801
		[99] => HSPHERE_5000_ACCOUNTS
802
		[100] => 4CPU_90CT_PIM
803
		[101] => PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VZ
804
		[102] => ADDON-WPB-45000-M
805
		[103] => PLESK_POWER_PACK_FOR_VZ
806
		[104] => 8CPU_250CT_PVA
807
		[105] => 1-LANGUAGE-PACK-FOR-PPA
808
		[106] => UO-UNL-W-M
809
		[107] => 2CPU_5VC_PVA
810
		[108] => ADDON-WPB-15000-M
811
		[109] => PLESK_RELOADED_POWER_PACK
812
		[110] => ADDON-WPB-7500-M
813
		[111] => PLESK-1000-SITES-FOR-VZ
814
		[112] => 10_UNITY_MOBILE_SITES
815
		[148] => 3_LANGUAGE_PACKS_FOR_VZ
816
		[149] => 2CPU_30CT_PIM
817
		[150] => ENTERPRISE
818
		[151] => 2CPU_50CT_PIM
819
		[152] => ADDON-HMP-W-M
820
		[153] => 2_LANGUAGE_PACKS_FOR_VZ
821
		[154] => 4_LANGUAGE_PACKS_FOR_VMM
822
		[155] => UO-UNL-L-M
823
		[156] => SB10X-12500
824
		[157] => 4CPU_50CT_PIM
825
		[158] => ADDON-WPB-20000-M
826
		[159] => HSPHERE_10000_ACCOUNTS
827
		[160] => 4CPU_3CT_PIM
828
		[161] => 3_LANGUAGE_PACKS
829
		[162] => 8CPU_90CT_PVA
830
		[163] => 5000_SITES
831
		[164] => 100_SITES
832
		[165] => PLESK_POWER_PACK
833
		[166] => 8CPU_400CT_PVA
834
		[167] => 500_EXT
835
		[168] => 5000_SITES_MULTI_SERVER
836
		[169] => 5_LANGUAGE_PACKS_FOR_VMM
837
		[170] => UNLIMITED_BATTLEFIELD_SERVERS
838
		[171] => ADDON-WPB-35000-M
839
		[172] => PLESK-100-SITES-FOR-VMM
840
		[173] => ADDON-WPB-50000-M
841
		[174] => 8CPU_4HV_PVA
842
		[175] => 8CPU_5HV_PVA
843
		[176] => 2CPU_10HV_PVA
844
		[177] => ADDON-WPB-300-M
845
		[178] => 2CPU_2HV_PVA
846
		[179] => 300_SITES_MULTI_SERVER
847
		[180] => 10_DOMAINS_FOR_VZ
848
		[181] => 1_LANGUAGE_PACK
849
		[182] => 4CPU_10CT_PIM
850
		[183] => ADDON-WPB-700-M
851
		[184] => 2CPU_30VC_PVA
852
		[185] => 2CPU_1HV_PVA
853
		[186] => 5_USERS_FOR_VPS
854
		[187] => 2CPU_10CT_PIM
855
		[188] => 500_SITES_MULTI_SERVER
856
		[189] => 300_DOMAINS
857
		[190] => 10000_SITES
858
		[191] => 8CPU_2HV_PVA
859
		[192] => ADDON-WPB-10000-M
860
		[193] => PLESK_POWER_PACK_FOR_WIN_FOR_VMM
861
		[194] => PLESK-1000-SITES-FOR-VMM
862
		[195] => 5_LANGUAGE_PACKS
863
		[196] => 1_LANGUAGE_PACK_FOR_VZ
864
		[197] => 2CPU_200CT_PIM
865
		[198] => VIRTUOZZO_PROMO_OFF
866
		[199] => SB10X-5000
867
		[200] => 8CPU_7HV_PVA
868
		[201] => 10_DOMAINS
869
		[202] => PRO
870
		[203] => 500_SITES
871
		[204] => 2CPU_70CT_PIM
872
		[205] => 1_BATTLEFIELD_SERVER
873
		[206] => 2CPU_150CT_PIM
874
		[207] => 2CPU_80CT_PIM
875
		[208] => ADDONVMM-HMP-L-M
876
		[209] => UNLIMITED_USERS
877
		[210] => 4CPU_30CT_PIM
878
		[211] => PLESK_POWER_PACK_FOR_WIN_FOR_VZ
879
		[212] => 8CPU_300CT_PVA
880
		[213] => 5_USERS
881
		[214] => 4CPU_150CT_PIM
882
		[215] => 10_BATTLEFIELD_SERVERS
883
		[216] => ADDON-WPB-100-M
884
		[217] => 8CPU_3HV_PVA
885
		[218] => ADDON-WPB-2500-M
886
		[219] => 5_LANGUAGE_PACKS_FOR_VZ
887
		[220] => 5_BATTLEFIELD_SERVERS
888
		[221] => DISABLE_GOOGLE_TOOLS
889
		[222] => 500_EXT_WHITELABEL
890
		[223] => UNLIMITED_DOMAINS_FOR_VZ
891
		[224] => SB10X-15000
892
		[225] => UNLIMITED_MAILBOXES_FOR_VZ
893
		[226] => 2CPU_5HV_PVA
894
		[227] => PLESK_7X_FOR_WIN_POWER_PACK
895
		[228] => PLESK-1000-SITES
896
		[229] => DISABLE_FEATURE_UPGRADES
897
		[230] => SB10X-20000
898
		[231] => ENTRY
899
		[232] => 2CPU_6HV_PVA
900
		[233] => 8CPU_30CT_PVA
901
		[234] => UO-UNL-W-1Y
902
		[235] => 2_LANGUAGE_PACKS
903
		[236] => 8CPU_UNLIMITEDVC_PVA
904
		[237] => 100_DOMAINS
905
		[238] => 8CPU_20CT_PVA
906
		[239] => 2CPU_3HV_PVA
907
		[240] => ADD_1_MANAGED_MSSQL
908
		[241] => 100_EXT
909
		[242] => 100_EXTENSIONS_FOR_VZ
910
		[243] => ADDON-WPB-500-M
911
		[244] => 8CPU_3CT_PVA
912
		[245] => 2CPU_9HV_PVA
913
		[246] => 1_LANGUAGE_PACK_FOR_VMM
914
		[247] => 8CPU_10CT_PVA
915
		[248] => 2CPU_15HV_PVA
916
		[249] => 2CPU_8HV_PVA
917
		[250] => STARTER
918
		[251] => ADDONVMM-HMP-W-M
919
		[252] => 7500_SITES
920
		[253] => 4CPU_40CT_PIM
921
		[254] => SB10X-30000
922
		[255] => PROFESSIONAL
923
		[256] => 1000_SITES
924
		[257] => 8CPU_350CT_PVA
925
		[258] => 2CPU_60CT_PIM
926
		[259] => HSPHERE_200_ACCOUNTS
927
		[260] => 8CPU_500CT_PVA
928
		[261] => SB10X-10000
929
		[262] => STH-WMP-BSC-M
930
		[263] => ADDON-WPB-25000-M
931
		)
932
933
		[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.
934
		[keyTypes] => Array
935
		(
936
		[0] => GLOBAL_MENTORING_LIVE_EXPERT_STANDARD_CARE
937
		[1] => PSBM_45_SPE
938
		[2] => PLESK-10-AND-LATER-FOR-VMM
939
		[3] => PLESK_ANTIVIRUS_BY_KAV_FOR_WIN_FOR_VZ
940
		[4] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-M
941
		[5] => MYLITTLEADMIN_2000
942
		[6] => MYLITTLEADMIN_2005
943
		[7] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN
944
		[8] => CRT-5-UNL-L
945
		[9] => GLOBAL_MENTORING_TOTAL_CARE
946
		[10] => LINUXMAGIC_MAGICSPAM
947
		[11] => PLESK_ANTIVIRUS_BY_KAV_FOR_VZ
948
		[12] => PINNACLE_CART_ECOMMERCE_SHOPPING_CART
949
		[13] => SYMANTEC_NORTON_INTERNET_SECURITY_10SEATS_MONTHLY
950
		[14] => ATI_PRO_FOR_WIN
951
		[15] => STOPTHEHACKER-M
952
		[16] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN_FOR_VZ
953
		[17] => SB10X-PA
954
		[18] => ATI_PRO
955
		[19] => CRT-30-UNL-L
956
		[20] => 4PSA_VOIPNOW_25_PROFESSIONAL
957
		[21] => CLOUDLINUX-L-M
958
		[22] => ATMAIL_WEBMAIL
959
		[23] => PLESK_10_AND_LATER_FOR_WIN
960
		[24] => CRT-5-100-L
961
		[25] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-1Y
962
		[26] => UNITY-ONE-W-M
963
		[27] => PLESK-10-AND-LATER-FOR-WIN-FOR-VMM
964
		[28] => GLOBAL_MENTORING_LIVE_EXPERT_BASIC
965
		[29] => CRT-50-UNL-L
966
		[30] => VIRTUOZZO_CONTAINERS_4
967
		[31] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_VZ
968
		[32] => PLESK_10_AND_LATER_FOR_VZ
969
		[33] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-M
970
		[34] => CRT-50-100-L
971
		[35] => UNITY-ONE-L-M
972
		[36] => PLESK_ANTIVIRUS_BY_DRWEB
973
		[37] => SYMANTEC_NORTON_INTERNET_SECURITY_MONTHLY
974
		[38] => CRT-100-UNL-L
975
		[39] => PARALLELS-CLOUD-SERVER
976
		[40] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-1Y
977
		[41] => CRT-100-100-L
978
		[42] => PLESK_10_AND_LATER_FOR_WIN_FOR_VZ
979
		[43] => PPA-L-M
980
		[44] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN
981
		[45] => PARALLELS-PREMIUM-ANTIVIRUS-FOR-VMM
982
		[46] => PLESK_ANTIVIRUS_BY_KAV_FOR_WIN
983
		[47] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_VZ
984
		[48] => SYMANTEC_NORTON_INTERNET_SECURITY_5SEATS_MONTHLY
985
		[49] => UNITY_MOBILE
986
		[50] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN_FOR_VZ
987
		[51] => SB10X
988
		[52] => UNITY_MOBILE_FOR_WIN
989
		[53] => PARALLELS-CLOUD-STORAGE
990
		[54] => CRT-30-100-L
991
		[55] => CLOUDFLARE-M
992
		[56] => VIRTUOZZO_CONTAINERS_4_FOR_WIN
993
		[57] => PLESK_10_AND_LATER
994
		[58] => PARALLELS_PREMIUM_ANTIVIRUS
995
		[59] => SYMANTEC_NORTON_INTERNET_SECURITY_3SEATS_MONTHLY
996
		[60] => PLESK_ANTIVIRUS_BY_KAV
997
		[61] => KEEPIT_ONLINE_BACKUP
998
		)
999
1000
		)
1001
		*/
1002
	}
1003
1004
}
1005