Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
and I want to post data in my program<FORM ENCTYPE="multipart/form-data" ACTION="prep_job.php" METHOD="POST +"> <INPUT TYPE="HIDDEN" NAME="TASK" VALUE="NEW"> <INPUT TYPE="FILE" NAME="UPLOAD" SIZE=20> <INPUT TYPE="TEXT" NAME="JOBNAME" SIZE=4 MAXLENGTH="4"> <br> <br> <INPUT TYPE="RADIO" NAME="CASE" VALUE="1"> <INPUT TYPE="RADIO" NAME="CASE" VALUE="2"> <INPUT TYPE="RADIO" NAME="CASE" VALUE="3"> <INPUT TYPE="FILE" NAME="UPLOAD2" SIZE=20> <br><BR> <B>E-mail </B> <INPUT TYPE="TEXT" NAME="EMAIL" SIZE=40> <br>< +br> <input type="checkbox" value="true" name="optin"> <INPUT TYPE="submit" VALUE="submit my job">
However when I do this instead of turning a result page like this; http://enm.lobos.nih.gov/success.php?jobno=36439947 it returns the original page as the content. What might be the problem? Does have to do with the code or the website? Thanks#!/usr/bin/perl -w use strict; use LWP::UserAgent; my $browser = LWP::UserAgent->new; my $response = $browser->post( 'http://enm.lobos.nih.gov/start.html', [ "upload"=> ["C:\\protean\\1o1l\\1o1l.pdb"], "jobname"=> "PRT1", "case" => "2", "email" => "email\@gmail.com", "optin" => "true", "upload2"=> ["C:\\protean\\1o1l\\1o1l.pdb"], ], 'Content_Type' => 'form-data', ); die "Error: ", $response->status_line unless $response->is_success; print $response->content; exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem Using POST
by grep (Monsignor) on Feb 02, 2008 at 01:00 UTC | |
by Joost (Canon) on Feb 02, 2008 at 01:19 UTC | |
by Anonymous Monk on Feb 02, 2008 at 14:13 UTC | |
by Anonymous Monk on Feb 02, 2008 at 18:47 UTC | |
|
Re: Problem Using POST
by nikosv (Deacon) on Feb 03, 2008 at 20:06 UTC | |
by Anonymous Monk on Feb 04, 2008 at 00:24 UTC | |
by marcussen (Pilgrim) on Feb 04, 2008 at 04:45 UTC |