#!/usr/bin/perl -w use strict; print "Content-type: text/html\n\n"; print <Image Example<title></head> <body> <img src="script2.cgi?size=20"> </body> EOT ##</code><code>## #!/usr/bin/perl -w use strict; use CGI; use GD; my $cgi=new CGI; my $cgi_size=$cgi->param('size') || '50'; print "Content-type: image/gif\n\n"; my $gd=new GD::Image($cgi_size,$cgi_size); my $blue=$gd->colorAllocate(0,0,255); $gd->fill(0,0,$blue); print $gd->gif; ##</code><code>## #!/usr/bin/perl -w use strict; my $rnd=int(rand()*8); my $img="images/banner".$rnd".gif"; print "Content-type: text/html\n\n"; print <<EOT; <html><head><title>Another Image Example<title></head> <body> <img src="$img"> </body> EOT