www.yourwebsite.com/cgi-bin/servebmp.cgi?saveThis=askldajlkdjasldkjaslkjasdljaslkas
And when you load the image, your perl script on the other end could decode the url and store the data. Oh, and when it's done, it should send back an image. perhaps a 1x1 bmp image. It has the smallest header:
############################################################### # # This function creates a simple B/W bitmap image # to send back to the browser as a response. # # Usage: SpitBMP(width, height) # # Example: SpitBMP(4, 3) ---> Creates a black 4x3 BMP image # sub SpitBMP { my $W = @_ ? shift : 1; my $H = @_ ? shift : 1; $|++; my $HEADERLEN = 62; my $DATASIZE = Ceil($W * $H / 8); my $FILESIZE = $DATASIZE + $HEADERLEN; my $BITS_PER_PIXEL = 1; my $HEADER = 'BM' . pack('VxxxxVVVV', $FILESIZE, $HEADERLEN, 40, $W, + $H) . chr(1) . pack('xCxxxxxV', $BITS_PER_PIXEL, $DATASIZE) . "\0" x + 20 . "\xFF\xFF\xFF\0"; my $OUTPUT = $HEADER . "\0" x $DATASIZE; print "Content-Type: image/bmp\n" . 'Content-Length: ' . length($OUTPUT) . "\n\n" . $OUTPUT; } ############################################################### # # Rounds a number up to the nearest integer. # # Usage: INTEGER = Ceil(FLOAT) # sub Ceil { my $DEC = shift; my $INT = int($DEC); return $INT if ($DEC - $INT == 0); return $INT + 1 if ($DEC > 0); return $INT - 1; }
In reply to Re: cgi page reload
by harangzsolt33
in thread cgi page reload
by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |