Thanks again Zentara.  I appreciate the help; the information you've
provided will give me a big jump in getting this going.

Regards,
Paul


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of zentara
Sent: Friday, November 03, 2006 6:45 AM
To: beginners@perl.org
Subject: Re: Question on using http rather than ftp

On Thu, 2 Nov 2006 12:08:41 -0600, [EMAIL PROTECTED] ("Paul King") wrote:


>          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?

Sure. They will have to provide you with the URL of the cgi script
that accepts the uploads. After that, it dosn't matter if they
are using Perl, they will have to follow the CGI protocol, so your
lwp-upload script will work.

There are some possible pitfalls though, like they may require
you send in a couple of form fields along with the file, or they
may want you to allow them to set a cookie first, or have javascript
enabled, or some other stupid Microsoft trick to force you to
use a Microsoft browser or system.

But you won't know that until they give you they URL. A decent
company would have a test URL setup for you to practice with,
maybe ask them.

If it gets too complex of an interaction, you will probably have to
switch to WWW::Mechanize from LWP. 
Mechanize, will let you get around any obstacle, by exactly simulating
the behavior of a real browser.

Mechanize comes with a cookbook of examples, you can google
for example scripts, or go to http://perlmonks.org and search
their site for WWW::Mechanize.

Such as:
http://perlmonks.org?node_id=469979
http://perlmonks.org?node_id=521497
http://perlmonks.org?node_id=437928


If you do run into a problem, and need help with
Mechanize, you will get better answers at
http://perlmonks.org   signup, it's free


See also this tutorial:
http://www.developer.com/lang/other/article.php/10942_3454041_2

Goodluck, zentara


-- 
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to