@@ -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; |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | |
5 | 5 | $ipAddress = $_SERVER['argv'][3]; |
6 | 6 | $cpl->format = 'json'; |
7 | -$lisc = json_decode($cpl->fetchLicenseId(['ip' => $ipAddress]), true); |
|
7 | +$lisc = json_decode($cpl->fetchLicenseId(['ip' => $ipAddress]), TRUE); |
|
8 | 8 | print_r($lisc); |
9 | 9 | $liscid = $lisc['licenseid'][0]; |
10 | 10 | |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | reason => 'Automagic Expiration', |
16 | 16 | expcode => 'normal' |
17 | 17 | ] |
18 | - ), true); |
|
18 | + ), TRUE); |
|
19 | 19 | print $expire['result'].PHP_EOL; |
20 | 20 | } else { |
21 | 21 | print "There is no valid license for $ipAddress\n"; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | $cpl = new \Detain\Cpanel\Cpanel($_SERVER['argv'][1], $_SERVER['argv'][2]); |
6 | 6 | $cpl->format = 'json'; |
7 | -$licenses = json_decode($cpl->fetchLicenses(), true); |
|
7 | +$licenses = json_decode($cpl->fetchLicenses(), TRUE); |
|
8 | 8 | echo json_encode($licenses, JSON_PRETTY_PRINT); |
9 | 9 | /* |
10 | 10 | foreach ( $licenses->licenses as $lisc ) { |