in reply to Hiding passed values in url

To hide the parameters you would have to do a POST request.

There are two problems with that:

  1. The CF script would have to support POST.
  2. You can't do a POST redirect with any reliability. There are some browsers for which it works, but for most it doesn't.
If you absolutely need to do this, you should use LWP::UserAgent, make a POST request, and then print it's result. The only drawback is that your CF script will see all the requests coming from the server running your script - that may or may not be a problem, depending on your application.

Replies are listed 'Best First'.
Re: Re: Hiding passed values in url
by Anonymous Monk on Mar 22, 2004 at 18:20 UTC
    I am looking into the UserAgent module and here is my attempt but it doenst seem to be working.
    use strict; use CGI qw(:standard); use LWP::UserAgent; use HTTP::Request::Common; my $query = new CGI; my $name = $query->param("name") || ""; my $city = $query->param("city") || ""; #do perl mail stuff here #etc...... $ua = LWP::UserAgent->new; $ua->request(POST 'http://webserverhere/mydirectory/act.cfm', [name => + $name, city => $city]); #not sure what do to from here?
      You are throwing away the result of the request. You should do something like:
      $result=$ua->request(POST 'http:.... if ($result->is_success) { # Everything OK print $result->content; # send everything to the user } else { # There was an error in the CF script die "or do something equaly drastic"; }