handling upload variables in POST with LWP



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


Relevant Pages

  • read post data as a buffer
    ... I think that is not possible to read post data as a buffer with php like ... it´s in perl. ...
    (php.general)
  • Re: read post data as a buffer
    ... I think that is not possible to read post data as a buffer with php like ... it´s in perl. ...
    (php.general)
  • Re: WCTP
    ... > Does Perl have a module for WCTP? ... LWP::UserAgent can post data ... to a HTTP server, and it doesn't care what the data is. ...
    (comp.lang.perl.modules)
  • http post request
    ... i am trying to post data to a website. ... the target page http://website.com/cgi-bin/quotes.pl does not take get requests. ... this code takes me to the website but does not post the data - i am assuming it is not posting since i am not getting the output. ...
    (microsoft.public.vc.mfc)
  • Perl POST
    ... The user presses a button. ... The website takes them to a page where they can ... The site (without displaying ... POST data to an URL and forward them to the website involved with the ...
    (perl.beginners)