Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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 15: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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.