Your code has almost everything you need to accomplish it, you just need to save the image somewhere and include it in the page. You will need to setup a directory your script can write files to, which is also accessible from the web, but how to do that is dependent on your web server...
my $img = join('.',time(),$$,'png');
open(OUT,">tmpimages/$img");
print OUT $gd->png;
close(OUT);
print "<IMG SRC=\"$img\">\n";
Of course you will also have to change your script to emit text/html rather than text/plain for a content-type.
| We're not surrounded, we're in a target-rich environment! |
|---|
|