Difference between revisions of "API List Servers"
From VMPanel
(Created page with "=== List all Servers === ---- '''Example Code:''' <?php require_once('VMPanel_API.php'); $apiusernme = 'apiusername'; $apipassword = 'apipassword'; $ip...") |
(→List all Servers) |
||
Line 10: | Line 10: | ||
$ip = 'xxx.xxx.xxx.xxx'; | $ip = 'xxx.xxx.xxx.xxx'; | ||
$port = 873; // Other Ports : 2021 , 2022 , 2023 , 2082 , 2222 | $port = 873; // Other Ports : 2021 , 2022 , 2023 , 2082 , 2222 | ||
− | $ | + | $vmpanel = new VMPanel_API($ip, $apiusernme, $apipassword, $port); |
− | $output = $ | + | $output = $vmpanel->serverlist(); |
print_r($output); | print_r($output); | ||
?> | ?> | ||
Line 19: | Line 19: | ||
Array | Array | ||
( | ( | ||
− | [1] => | + | [1] => 1_localhost |
) | ) |
Latest revision as of 15:44, 14 September 2016
List all Servers
Example Code:
<?php require_once('VMPanel_API.php'); $apiusernme = 'apiusername'; $apipassword = 'apipassword'; $ip = 'xxx.xxx.xxx.xxx'; $port = 873; // Other Ports : 2021 , 2022 , 2023 , 2082 , 2222 $vmpanel = new VMPanel_API($ip, $apiusernme, $apipassword, $port); $output = $vmpanel->serverlist(); print_r($output); ?>
Returns:
Array ( [1] => 1_localhost )