I did something similar using CGI and (ugh!) Visual Basic. Yes, you can do CGI in VB.
Anyway, it would read in part of a html file (header, part of body, including a table), use code to dynamically generate a form based on a text file, and then spit out the rest of a html file (close table, etc.)
I guess you could do something similar locally, output files into a directory, then use a perl script to upload all of the files via ftp to your web host.
Here's some perl that should get the file uploaded for you:
Code:
#!/usr/bin/perl
use Net::FTP;
my(@files) = qw( html_file.html image_file.jpg );
system("cd /path/to/files/to/be/uploaded");
# Change 'ftp.servername.com to your ftp server
$ftp = Net::FTP->new("ftp.servername.com");
# Replace 'username' and 'password' with the actual login information for the ftp server mentioned above
$ftp->login("username", "password");
# Change directories
$ftp->cwd("/directory/to/upload/to");
# Store the files on ftp.servername.com
foreach $file(@files) {
if(!($ftp->put($file)))
{
print "Unable to upload file \"$file\".\n\n";
}
else
{
print "File \"$file\" stored.\n";
}
}
$ftp->quit;
Bookmarks