Use the VNC Info API to get vnc information of the VPS present on your server. Using this information you can remotely connect to your VPS. A third party VNC client software would be needed for accessing the VPS console which will utilize this information.
See also: VNC
HTTP Request
https://hostname:4085/index.php?act=vnc
Parameters
Name | Method | Value | Description | Required |
---|---|---|---|---|
act | GET | vnc | The action specified to carry out operation and return data | Yes |
novnc | POST | Int | The ID of the Vps | Yes |
Sample Code
<?php
require_once('/usr/local/virtualizor/sdk/admin.php');
$key = 'your_api_key';
$pass = 'your_api_pass';
$ip = 'your_server_ip';
$admin = new Virtualizor_Admin_API($ip, $key, $pass);
$post = array();
$post['novnc'] = 62;
$output = $admin->vnc($post);
print_r(json_encode($output));
?>
Output
{
"title": "VNC",
"info": {
"port":"5951",
"ip":"xx.xx.xx.xx",
"password":"xxxxxxxxxx",
},
"timenow": 1535458345,
"time_taken": "0.134"
}