Assuming this is about stealing bandwidth (no way to stop people from saving your flash to their computers), and you're not into the Apache options posted above, this would be a way to serve up a file using CGI:
(add error-checking!)use strict; use warnings; use CGI; my $flash_file = 'your_flash_file.swf'; open FLASH, '<', $flash_file or die $!; binmode FLASH; my $q = new CGI; print $q->header( -content-type => 'flash/swf' -content_Length => (stat FLASH)[7] ); my $buffer; while (read(FLASH, $buffer, 1024) > 0){ print $buffer; } close FLASH;
You may need to do some research on the HTTP headers to send along with the data. I am just guessing at the Content-type, for instance.
Hope this helps.
In reply to Re: Using perl to stream flash
by crashtest
in thread Using perl to stream flash
by Feltros
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |