in reply to Submitting information to an online form
In your case, the code will look like:
One advantage is that your form values will be properly URI escaped, something you hadn't coded yet. {grin}use LWP; use HTTP::Request::Common; my $start_town = "Guildford"; my $destination_town = "Portsmouth"; my $ua = LWP::UserAgent->new; # alter ua here if needed my $response = $ua->simple_request(POST "http://212.87.65.227/bin/query.exe/en", [ to => $start_town, from => $destination_town ] ); if ($response->is_success) { print $response->content; } else { print "ERROR: ", $response->status_line; }
-- Randal L. Schwartz, Perl hacker
|
|---|