vnStatGraphP/vnstati.php
2016-03-28 21:42:38 -05:00

33 lines
716 B
PHP

<?php
//
// vnstati.php
// vnStatGraphP
//
// Created by Mr. Gecko on 3/28/16.
// Copyright (c) 2016 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
//
require("config.php");
//No caching as this is always changing.
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Pragma: no-cache");
header("Content-type: image/png");
//Prepare extra arguments for executing the command.
$arguments = "";
if ($noHeader) {
$arguments .= " -nh";
}
if ($noEdge) {
$arguments .= " -ne";
}
if ($noLegend) {
$arguments .= " -nl";
}
if ($rateUnit) {
$arguments .= " -ru";
}
passthru($vnStatIBin." -i ".escapeshellarg($iface)." -".$graph.$arguments." -o -");
?>