Posting files to a secure site

sdavis35@csc.com
Wed, 17 Jan 2001 16:55:56 -0500


I need to post text files to a secure web site.  All the information I have
is the following:

URL (https://some URL)
the username
the password

I have been messing around with the following sample code that I found...
but it doesn't seem to be fulfilling my needs since I don't know of any cgi
script on the server side.  Is there information I am missing that is
necessary for me to post text files to this site?  Can anyone point me to
sample code that will help me?


use LWP::Simple;
use URI::URL;
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
$ua = LWP::UserAgent->new(); #create a user agent
#post the message to the server
#this will activate the program that needs to run
#in this program, reciever.pl will run on the server side
$streamstring = "string to be passed to the server";
my  $req = POST 'http://3.212.228.149/cgi-bin/reciever.pl',[Filecontents =>$streamstring];
$req->content_type('application/x-www-form-urlencoded');
$req->content('match=www&errors=0');
#content is what the server sends back after processing
$content = $ua->request($req)->as_string;
print $content;

Thanks,
Sammy Davis