-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of zentara
Sent: Thursday, November 02, 2006 8:04 AM
To: beginners@perl.org
Subject: Re: Question on using http rather than ftp
On Wed, 1 Nov 2006 15:38:22 -0600, [EMAIL PROTECTED] ("Paul King") wrote:
> We currently have a perl process that places our purchase orders
>on our vendors' servers via ftp. I am now working with a new vendor
and
>their requirement is for transfer via https rather than ftp. Ftp
allows
>the entire exchange process to be initiated and run from our end. We
>establish the connection, change directories as needed, push (put) the
>file(s) to the server, and disconnect the connection, leaving the
vendor
>to deal with the file on their own time frame from thereon out.
>Is this scenario possible using http? If this is possible, can someone
>point me in a direction where I might get some insight into this and
how
>to begin? If it's not possible, does anyone have any other options for
>this type of client side initiated and controlled exchange? I have
>looked at several Perl books: Perl & LWP, Building Scalable Web Sites,
>Programming Web Services with Perl, etc and everything I can see
>indicates to me that the transaction needs to be initiated from what
>would be the vendor's side (pull) rather than ours (push). Any
pointers
>would be appreciated.
>From what I can gather from your post, you need to connect to their
https server, and deposit some files?
If so, you are looking for a "lwp-upload-script", and that will do it.
First install the libwww-perl module, and read the README.ssl
file, which tells you which modules need to be installed for ssl
support.
Once that is done, an lwp-upload script can be written, to automatically
connect thru https to a cgi script running on their https server. Then
the directory location where your file will be placed will be controlled
by the cgi script.
The question is, are you able to provide the vendor, with your own
custom cgi script, or are you forced to use their script?
Below are a couple of sample scripts, which should help you
get started. One is the upload.cgi script, and the other is the
lwp-uploader.
---< Scripts cut for space - see previous email under this subject >
Thanks Zentara and Oleg for your input.
Zentara,
The sample scripts you provided will be quite helpful in
providing me with a place to start. I'm almost positive I won't be able
to provide the vendor with my own script to be invoked on their server.
Consequently, will I be able to call a script written in some arbitrary
language from the POST function provided they are using CGI?
Thanks again,
Paul
[EMAIL PROTECTED]