@@ -3,11 +3,11 @@ discard block |
||
3 | 3 | $cpl = new \Detain\Cpanel\Cpanel($_SERVER['argv'][1], $_SERVER['argv'][2]); |
4 | 4 | |
5 | 5 | $ipAddress = $_SERVER['argv'][3]; |
6 | -$cpl->format='json'; |
|
6 | +$cpl->format = 'json'; |
|
7 | 7 | $status = json_decode($cpl->fetchLicenseRaw(['ip' => $ipAddress]), true); |
8 | 8 | print_r($status); |
9 | 9 | if (isset($status['@attributes'])) { |
10 | - print 'The license id for the ip is: ' . $status['@attributes']['licenseid'].PHP_EOL; |
|
10 | + print 'The license id for the ip is: '.$status['@attributes']['licenseid'].PHP_EOL; |
|
11 | 11 | print 'The status of the license is: '; |
12 | 12 | if ($status['@attributes']['valid'] > 0) { |
13 | 13 | print 'Active'; |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | print 'Inactive'; |
16 | 16 | } |
17 | 17 | print "\n"; |
18 | - print 'The company holding the license is: ' . $status['@attributes']['company']. |
|
18 | + print 'The company holding the license is: '.$status['@attributes']['company']. |
|
19 | 19 | "\n"; |
20 | 20 | } else { |
21 | 21 | print "The status of the license is: Not Licensed\n"; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | $ipAddress = $_SERVER['argv'][3]; |
6 | 6 | $cpl->format='json'; |
7 | -$status = json_decode($cpl->fetchLicenseRaw(['ip' => $ipAddress]), true); |
|
7 | +$status = json_decode($cpl->fetchLicenseRaw(['ip' => $ipAddress]), TRUE); |
|
8 | 8 | print_r($status); |
9 | 9 | if (isset($status['@attributes'])) { |
10 | 10 | print 'The license id for the ip is: ' . $status['@attributes']['licenseid'].PHP_EOL; |