Hello, i'm trying to integrate Virtualizor with a commercial billing software and every time i use the API, the output is "false".
Why? All data from the API is 100% correct and when i try to use the API via direct link opening it is working.
PHP Code $key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$pass = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$ip = 'censored IP';
require($_SERVER['DOCUMENT_ROOT'].'/content/addons/Virtualizor/API/admin.php');
$admin = new Virtualizor_Admin_API($ip, $key, $pass);
$page = 0;
$reslen = 0;
//For Searching
$post = array();
$post['vpsid'] = '';
$post['vpsname'] = '';
$post['vpsip'] = '';
$post['vpshostname'] = '';
$post['vsstatus'] = '';
$post['vstype'] = '';
$post['speedcap'] = '';
$post['user'] = '';
$post['vsgid'] = '';
$post['vserid'] = '';
$post['plid'] = '';
$post['bpid'] = '';
$post['serid'] = '';
$post['search'] = '';
$output = $admin->listvs($page ,$reslen ,$post);
print_r(json_encode($output)); // RETURNS "false"
|