Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Uploading media, then displaying it

Name: Roger 2007-06-14 22:45 ID:GTmqL9WA

I need a script in where I can upload a flash and it generates a page with it.

Name: Anonymous 2007-06-16 5:43 ID:22c75lrl

#!/usr/bin/perl

use strict;
use CGI;
use MIME::Base64 qw(encode_base64);

my $query=new CGI;
my $file=$query->param('file');

print "Content-type: text/html;\n\n",'<html><body><form method="post" action="',$ENV{SCRIPT_NAME},'"><input type="file" name="file"><input type="submit"></form>';

if($file){
 binmode $file;
 local($/) = undef;
 print '<object type="application/x-shockwave-flash" data="data:application/x-shockwave-flash;base64,',encode_base64($file),'"></object>';
}

print "</body></html>\n";

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List