Aca esta el codigo
Estimado si me puede ayudar
Código PHP:
ob_start();
$guest_account = true;
include("./include/auth.php");
include_once("./lib/rrd.php");
/* ================= input validation ================= */
input_validate_input_number(get_request_var("graph_start"));
input_validate_input_number(get_request_var("graph_end"));
input_validate_input_number(get_request_var("graph_height"));
input_validate_input_number(get_request_var("graph_width"));
input_validate_input_number(get_request_var("local_graph_id"));
input_validate_input_number(get_request_var("rra_id"));
/* ==================================================== */
header("Content-type: image/png");
/* flush the headers now */
ob_end_flush();
do_hook_function('graph_image');
session_write_close();
$graph_data_array = array();
/* override: graph start time (unix time) */
if (!empty($_GET["graph_start"])) {
$graph_data_array["graph_start"] = $_GET["graph_start"];
}
/* override: graph end time (unix time) */
if (!empty($_GET["graph_end"])) {
$graph_data_array["graph_end"] = $_GET["graph_end"];
}
/* override: graph height (in pixels) */
if (!empty($_GET["graph_height"])) {
$graph_data_array["graph_height"] = $_GET["graph_height"];
}
/* override: graph width (in pixels) */
if (!empty($_GET["graph_width"])) {
$graph_data_array["graph_width"] = $_GET["graph_width"];
}
/* override: skip drawing the legend? */
if (!empty($_GET["graph_nolegend"])) {
$graph_data_array["graph_nolegend"] = $_GET["graph_nolegend"];
}
/* print RRDTool graph source? */
if (!empty($_GET["show_source"])) {
$graph_data_array["print_source"] = $_GET["show_source"];
}
print rrdtool_function_graph($_GET["local_graph_id"], $_GET["rra_id"], $graph_data_array);