Send image to client : Image « CGI « Perl






Send image to client

   

#!/usr/local/bin/perl

use CGI;

$co = new CGI;

open (IMAGE, "<image.gif");

$size = -s "image.gif";

read IMAGE, $data, $size;

close IMAGE;

print 

$co->header(-type=>'image/gif'),

$data;

   
    
    
  








Related examples in the same category

1.Image based counter