Forum Moderators: coopster & phranque

Message Too Old, No Replies

Redirecting Post Variables

How to redirect perl variables to another page.

         

chrisa2004

2:26 pm on Jul 15, 2004 (gmt 0)

10+ Year Member



Hi

I am looking to send some variables I have in a perl application to some in a php app. To do this I would like to use the POST method.

Is there a way that this can be done without having to put the variables in a form that needs a submit button?

I'm currently thinking along the lines of an intermediary perl script that gets the variables and redirects the user to the php app. Doing this I can easily append the variables using the GET method, but I would prefer to use the POST if at all possible.

Note this does not to be a secure application link.

Thanks
Chris

jatar_k

4:01 pm on Jul 15, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld chrisa2004,

have you looked at curl [curl.haxx.se]?

chrisa2004

4:32 pm on Jul 16, 2004 (gmt 0)

10+ Year Member



Hi Thanks for the prompt reply.

I am trying out the curl library.

I must be reading the docs wrong somewhere as I keep getting a "The page cannot be displayed" in the browser.

I can see no error in the apache logs.

I am using this as my intermediate script.


#!c:/data/perl/bin/perl

my $username = test;
my $password = test;

exec "curl -d 'username=$username%20password=$password' localhost/myphpprog/login.php";
exit();

Any ideas as to what I missing out?