<?php
// Include the VPN data file for the format.
include 'vpn_data.php';

// Require a refernce to (00_vpnstatus.txt).
require '../../00_vpnstatus.txt';

/* Create an array to store the values */
$vpn_data = [
    'VPN_now_time' => $VPN_now_time,
    'VPN_installed' => $VPN_installed,
    'VPN_state' => $VPN_state,
    'VPN_version' => $VPN_version,
    'VPN_start_time' => $VPN_start_time,
    'VPN_total_run_time' => $VPN_total_run_time,
    'VPN_bootstrap_phase' => $VPN_bootstrap_phase,
    'VPN_total_read' => $VPN_total_read,
    'VPN_total_written' => $VPN_total_written,
    'VPN_bandwidth_cache' => $VPN_bandwidth_cache,
    'VPN_nickname' => $VPN_nickname,
    'VPN_flags' => $VPN_flags,
    'VPN_bandwidth_concensus' => $VPN_bandwidth_concensus,
    'VPN_download_bytessec' => $VPN_download_bytessec,
    'VPN_upload_bytessec' => $VPN_upload_bytessec,
    'VPN_download_avg' => $VPN_download_avg,
    'VPN_upload_avg' => $VPN_upload_avg,
    'VPN_CPU_usage' => $VPN_CPU_usage, 
    'VPN_RAM_usage' => $VPN_RAM_usage 
];

/* Set the content type to JSON */
header('Content-Type: application/json');

/* Output the JSON-encoded data */
echo json_encode($vpn_data);

?>
