Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: question about forwarding variables to php from perl

by Roger (Parson)
on Dec 15, 2003 at 12:02 UTC ( [id://314798]=note: print w/replies, xml ) Need Help??


in reply to Re: question about forwarding variables to php from perl
in thread question about forwarding variables to php from perl

Hi Nathan,

What are the variables that you want to pass to PHP anyway? It will be quite easy to setup the CGI variables once you know what are the names and contents of the variables to be passed to the PHP script.

I suspect that your PHP script might expect variables such as below:
my %vars = ( from => $From_address, # assume multiple addressed are separated by comma to => join(',', @To_addresses), cc => join(',', @Cc_addresses), subject => $Subject, body => $Mail_body, # etc. ); # and then invoke the PHP script via POST # send the POST to php my $url = "http://domain.com/test.php"; my $req = new HTTP::Request; my $res = $us->post($url, \%vars);
You might want to check the return result $res to see if the mail has been processed properly by the PHP script.

Replies are listed 'Best First'.
Re: Re: Re: question about forwarding variables to php from perl
by nathan0601 (Initiate) on Dec 15, 2003 at 20:59 UTC
    Hi, The goal of what I am doing is simply to create a list serv app using php. So the php script needs to receive vars (everything that would have been in the email sent to the perl script, parsed into vars) The above posts are helpful. I will play with the script later after class. Thanks for your help.
      OK, we are making progress. I have perl and php talking now.

      How can I pass vars without a form action? Say I have the vars working if I use a submit button (I suppose they are 'hidden' vars.

      Now I want the perl script to perform a redirect sort of function, bringing the vars to the php script without any interactive user action needed- In other words I want to run blah.cgi and have it pass any values defined in blah.cgi to blah.php.

      Thanks for your patience and time with me. Nathan

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://314798]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2025-01-18 07:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (56 votes). Check out past polls.