[EMAIL PROTECTED] (Allen Wilson) writes:
> Does anyone have an idea of how to set up a remote host request. I am attempting
> to set up a web system where the user makes a request and it is process from one
> server to another. The remote server will return a file that will be formatted
> in a web page.
>
> I already have the formatting done...it is the connection and requesting from
> the remote server giving me the problem. I tried to run the remote shell (remsh
> ) but that failed.
>
> Any ideas would be appreciate.
If you must use the user's entries to a form as a subset of that
submitted to the remote server you might use LWP as indicated below
in a sub that posts certificate requests to an internal network
Certificate Management System:
### proc_cert ##########################################################
# Process the certificate request
########################################################################
sub proc_cert {
# Assume a KEYGEN or similar certificate request was generated by browse
my $keygen = $q->param('subjectKeyGenInfo');
$keygen =~ tr/\n//d if defined($keygen); #strip extra newline
# Post a request to our internal certificate server with the data passed
my $ua = LWP::UserAgent->new;
my $page = $ua->request(POST $CMSsrvwport . "/enrollment",
['uid' => $q->param('uid'),
'pwd' => $q->param('pwd'),
'email' => 'true',
'ssl_client' => 'true',
'digital_signature' => 'true',
'non_repudiation' => 'true',
'key_encipherment' => 'true',
'subjectKeyGenInfo' => $keygen,
'submit' => 'Submit',
'certType' => 'client',
'authenticator' => 'UserDirEnrollment',
'importCert' => 'off'
]);
# Test if server returned a valid page
if ($page->is_success) {
print $page->content;
} else {
print $page->error_as_HTML;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]