# $Id: FAQ,v 1.1 2001/11/27 16:35:20 joeym Exp joeym $
#


Q:  I would like the rrd_graph() function to output the generated image
    to stdout.  IE: something along the lines:
        rrd_graph("-", $opts, count($opts));
            or
        rrd_graph("php://stdout", $opts, count($opts));

A:  There currently is no way for the php4-rrdtool module to handle this.
There are a couple of possibile avenues of approach for adding this to
php4-rrdtool, but those will come at a later date after more testing
to find the best method is done.

In the meantime, it is possible to achieve the desired effect:

<? 
  php Header("Content-type: image/gif");                                         

  $opts = ....;

  $f = tempnam("/tmp","rrd");
  $ret = rrd_graph($f, $opts, count($opts));
  readfile($f);
  unlink($f);
?>

Thanks to Konrad Riedel for the above contribution.
