#!/usr/bin/perl -w #-------------------------------------------------------------- # download.cgi # # A Perl CGI script that requests a user's email address # before they may download a build from the i-scream web site. # It is not essential for them to enter their email address. # # Copyright Paul Mutton, 2001. #-------------------------------------------------------------- use strict; use CGI; $| = 1; #-------------------------------------------------------------- # Essential Settings #-------------------------------------------------------------- my $build_dir = "/builds"; my $log_file = "download_log"; #-------------------------------------------------------------- my $query = new CGI; my ($file_name) = ($query->param('file_name') =~ /^\s*(.*)\s*$/); my ($your_name) = ($query->param('your_name') =~ /^\s*(.*)\s*$/); my ($email_address) = ($query->param('email_address') =~ /^\s*(.*)\s*$/); my ($country) = ($query->param('country') =~ /^\s*(.*)\s*$/); my ($submit) = ($query->param('submit') =~ /^\s*(.*)\s*$/); my ($date) = scalar localtime time; $your_name =~ s/\|//g; $email_address =~ s/\|//g; $country =~ s/\|//g; if (!defined($file_name) || $file_name eq "") { print "Content-type: text/html\n\n"; print "You must specify a filename for use with the i-scream downloader."; exit; } if (defined($submit) && $submit eq "Download") { open(LOGFILE, ">>$log_file"); print LOGFILE "$date|$file_name|$your_name|$email_address|$country\n"; close(LOGFILE); print "Location: $build_dir/$file_name\n\n"; } else { print "Content-type: text/html\n\n"; print <

i-scream builds

At the current moment, all i-scream builds may be downloaded free of charge. If you wish to be alerted infrequently about important issues regarding the i-scream montoring system, then we would recommend that you provide your contact details below. All fields are optional.

 

Filename: $file_name
Your name:
Email address:
Country:
 
EOT } exit;