where filepath is the folder in which u store all the files which the users want to download (e.g. "/tmp") and the filename is the value passed along in the URL (or by the POST method)chdir($filepath); my $filesize = -s $filename; print "Content-disposition: attachment;filename=$filename\n"; print "Content-Length: $filesize\n"; print "Content-Type: application/octet-stream\n\n"; open(READ,$filename) || die; while (<READ>) { print; } close(READ);
In reply to Re: Creating dynamically named CGIs
by screamingeagle
in thread Creating dynamically named CGIs
by ryan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |