handling upload variables in POST with LWP
- From: saurabhsinghvi@xxxxxxxxx (Saurabh Singhvi)
- Date: Wed, 16 Aug 2006 11:50:44 +0000
Hi all,
Following is the data of post that I have for a website. I need to post data
using perl.
I am able to handle the normal variable passsing, but I don't understand how
to handle
the values of upload boxes. I need them to be empty.
Content-Type: multipart/form-data;
boundary=---------------------------41184676334
Content-Length: 582
Connection: keep-alive
Proxy-Authorization: Basic c29iZXJzXzIwMDI6YWx0bzMzMDY=
Posting 582 bytes...
-----------------------------41184676334
Content-Disposition: form-data; name="email"
sobers@xxxxxxxxxx
-----------------------------41184676334
Content-Disposition: form-data; name="seq"
AAAFFF
-----------------------------41184676334
Content-Disposition: form-data; name="fileup"; filename=""
Content-Type: application/octet-stream
-----------------------------41184676334
Content-Disposition: form-data; name="input"
seq
-----------------------------41184676334
Content-Disposition: form-data; name="pdb"
on
-----------------------------41184676334--
the code that I am using to post is of the following form :
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
open(OUTPUT,'>>output.txt');
open(CRASH_OUT,'>>prot_remaining.txt');
$email = 'emailaddress';
my $ua = LWP::UserAgent->new();
$ua->env_proxy;
$req = (POST 'http://www.predictprotein.org/cgi-bin/pp/submit',
[foo => bar, bar => foo]);
So please let me know how to go about handling the upload variables.
thanks
Saurabh
- Follow-Ups:
- Re: handling upload variables in POST with LWP
- From: Tom Phoenix
- Re: handling upload variables in POST with LWP
- Prev by Date: Split String by //
- Next by Date: Strange Perl output
- Previous by thread: Split String by //
- Next by thread: Re: handling upload variables in POST with LWP
- Index(es):
Relevant Pages
|