in reply to Yet another counter
You also should have a Content-length: line in your http header. Then print a blank line: 'print "\n";' to end the http header.
Then do a binmode STDOUT; and spit out the data that makes up the image.
You close the image by ending the script.
# assumes image data is in $image my $size = length $image; print "MIME-version: 1.0\n"; print "Content-type: image/bmp\n"; print "Content-length: $size\n"; print "\n"; binmode STDOUT; print $image; # done
BUT... in my experience, standard browsers do not display .bmp files. Perhaps you were using 'bmp' in a more generic sense to mean 'graphic'. If so, just substitute the appropriate MIME type in the Content-type line.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Yet another counter
by earthboundmisfit (Chaplain) on Jul 17, 2001 at 16:46 UTC |