On 31 Mar 99, at 17:20, Michael A. Stone wrote:
> in that case, the short answer is: "you can't".
> failing the impossible and the terminally (with any luck)
> careless, you have three remaining options:
>
> 1. make the user click the submit button a second time
> 2. pass the information directly from server A to server B
> 3. use a redirected GET query with an extension
> working solution will be fairly complex. #3 is simpler, so
> that's the one i mentioned.
Another great post from Mr. Stone. I have been beating my head
against the wall trying to get this to work.
I am very interested in supplying data behind the scenes to a form.
Well I think it is not too difficult except for doing it in a secure
mode.
I hope Stephen shares what he finally does.
The best I have been able to do is to get the contents of a password
protected file but NOT to transport you there (which was what I hoped
to do).
Here is the url (for the curious):
http://www.rede.com/samples/indirect.html
and here is the code I used:
#!/usr/local/bin/perl
use CGI;
$|++;
use LWP::UserAgent;
use strict;
my $q = new CGI;
use vars qw($ua $req $get_url $res $user $pwd $get_url);
$ua = new LWP::UserAgent;
print $q->header();
$user = $q->param('name');
$pwd = $q->param('password');
$get_url = $q->param('url');
$req = new HTTP::Request 'GET',"$get_url";
$req->authorization_basic("$user", "$pwd");
$res = $ua->request($req);
print $ua->request($req)->as_string;
if ($res->is_success) {
print $q->redirect("$get_url");
print qq|<a href="$get_url">click here</a><hr>|;
}else {
print $res->error_as_HTML();
print qq|
<p>
You entered:
<p>$user
<p>$pwd
<p>$get_url
<hr>
|;
exit;
}
Might is not Right. But there is a lot of Might knocking
about in this world, and something has to be done about it.
-- King Arthur, The Once and Future King
____________________________________________________________________
--------------------------------------------------------------------
Join The NEW Web Consultants Association FORUMS and CHAT:
Register Today at: http://just4u.com/forums/
Web Consultants Web Site : http://just4u.com/webconsultants
Give the Gift of Life This Year...
Just4U Stop Smoking Support forum - helping smokers for
over three years-tell a friend: http://just4u.com/forums/
To get 500 Banner Ads for FREE
go to http://www.linkbuddies.com/start.go?id=111261
---------------------------------------------------------------------