<?php
$rrdFile = "/tmp/net.rrd";
$imgFile = "/tmp/speed.png";

//graph output
rrd_graph( $imgFile,
 array(
  "--start", "920804400",
  "--end", "920808000",
  "--vertical-label", "m/s",
  "DEF:myspeed=$rrdFile:speed:AVERAGE",
  "CDEF:realspeed=myspeed,1000,*",
  "LINE2:realspeed#FF0000"
 )
);


sleep(3);

$img = file_get_contents( $imgFile );


header("Content-Type: image/png"); 
print $img;

?>
