in reply to Re: redirecting, html forms, mechanize
in thread redirecting, html forms, mechanize
#!/usr/bin/perl use warnings; use strict; use Data::Dumper; use WWW::Mechanize; use CGI qw/:standard/; use CGI::Carp qw(warningsToBrowser fatalsToBrowser); my $q = new CGI; my $addr = $ENV{'REMOTE_ADDR'}; my $m = WWW::Mechanize->new(); my $url = 'http://projects.villa-bosch.de/dbase/molsurfer/submit-elec. +html'; $m->get($url); $m->add_header(location => $addr); $m->set_fields( FILE1 => $file1, FILE2 => $file2, mapsize =>'59x59', resolution =>'med', pdie =>'4', sdie =>'80', ioss =>'150', ionr =>'1.5', nmap =>'0.0' ); my $response = $m->submit(); print $q->header; print $response->content();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: redirecting, html forms, mechanize
by Your Mother (Archbishop) on Jun 29, 2009 at 00:04 UTC |