API List Servers

From VMPanel
Revision as of 15:44, 14 September 2016 by Mahdi8492 (Talk | contribs) (List all Servers)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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
     )