<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://REDACTED:8006/api2/json/nodes/usa01/qemu/125/agent/exec',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true...