Just off the top of my head, I'm thinkig you could do it the SuperHack(tm) easy way, and create a frame within your page that gets redirected to the external website and shown to the user as if it was a part of your site.
A better trick would be to use LWP::Simple to get the external page yourself and send the resulting HTML to your client.
If you choose the hard(er) route, you might want to consider building the CGI variables right into the URL you pass to the external site in the form of:
http://external.html.page/externform.cgi?name=myclient&password=hispass&id=10
. . or maybe this isn't what you want at all.. . . | [reply] |
Have you looked at the LWP::* modules (LWP::Simple, LWP::UserAgent, etc..)?
Cheers,
KM | [reply] |
here's a trivial demo that outlines the basics. as the monks have already noted, LWP::Simple
is a good solution for GET's. the 'map' statement just forms the foo=somevalue
pairs. the get() is an LWP::Simple method that makes the HTTP request and returns the page
returned by the remote (or in this case, local) server.
#!/usr/bin/perl -Tw
use CGI qw( :header :param );
use LWP::Simple;
use strict;
my %pairs = ();
my $remote_script = "http://localhost/cgi-bin/demo.pl";
for my $p ( qw( foo bar ) ) { # assume 'foo' and 'bar' are the params
$pairs{$p} = param($p);
}
# there's more than one way to do this . . .
my @params = map { $_ = $_ . '=' . $pairs{$_} } keys %pairs;
my $url = $remote_script . '?' . join '&', @params;
print header;
print "GET'ing $url<p>\n";
print get($url);
| [reply] |