>"Can I take a CGI-Post of form data to my server, record the
>posted data, and then send back a header such that the browser
>re-posts the data to another server?"

yes.. depending on how much data you have.

the trick is to convert the form data sent by the POST query to
server A into a URL extension for a GET query on server B.   in
general, that's simple:


    #!/usr/local/bin/perl

    #
    #  this script lives on server A.
    #  it gets called from a form, using the POST method.
    #

    $URL = 'http://serverB.foo.com/cgi-bin/script2.pl';

    read (STDIN, $input, $ENV{'CONTENT_LENGTH'});
    print "Location:  $URL?$input\n\n";

----  EOF  ----

    #!/usr/local/bin/perl

    #
    #  this script lives on server B.
    #  it gets called through a link, using the GET method.
    #

    $input = $ENV{'QUERY_STRING'};
    print <<__done;
    Content-type:  text/html

    <html>
    <head><title>Server B Response</title></head>
    <body>

    <b>THE INPUT TO SERVER A WAS:</b>
    <br> $input

    </body>
    </html>

    __done

----  EOF  ----


the caveat is that there's an upper limit to the length of data
which can be tacked onto a URL.   i don't recall the number off
the top of my head, but i think it's somewhere around 1K.

if you're just asking the user to log in on one machine, and
want to pass the approved identity to the next, that should be
no problem.   if you want to pass a whole truckload of data from
the first machine to the second, you'll need to look at ways to
compress the data.

that's your basic state-preserving bankshot from one server to
another, though.







mike stone  <[EMAIL PROTECTED]>   'net geek..
been there, done that,  have network, will travel.



____________________________________________________________________
--------------------------------------------------------------------
 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
---------------------------------------------------------------------

Reply via email to