On 12/6/05, Alex Brelsfoard <[EMAIL PROTECTED]> wrote: > Does anyone who has/does use GD::Graph know if there's an easy way to embed > the output graphs into HTML. > Basically I'd like to be able to print a bunch of HTML, then the graph, then > some more HTML. > I've got the grph coming out all fine and dandy.
You have to print out HTML that includes an embedded image, and make the URL for that image be served by your program that prints out the graph. One warning if you shell out in a CGI script: be ABSOLUTELY sure that you send headers before calling the shell. A very common mistake is to print your header then call the shell, not realizing that your print just saved data in a buffer and then waits to send it until either the buffer is full or your program ends. The result is that in your code you see the header printed before the graph, but Apache receives graph before the header and gets upset at you. Cheers, Ben _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

