Re: HTTP POST Question

From: Date: Mon, 19 Feb 2001 18:08:55 +0000
Subject: Re: HTTP POST Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40595@lists.php.net to get a copy of this message
I've been struggling with the same idea. I haven't been able to process the returned value, but I've the following methods to DISPLAY the cgi results. Although, the PHP has no way of knowing wether the CGI evaluated to a Yes or No result. If you solve this, then please let me know. $server = "http://www.mydomain_name.com/my_cgi_file.cgi?var1=valueOne&var2=valueTWO"; //var1 and var2 are the parameters that you are passing to the CGI for processing. //your cgi would process these variables, then 1) print out the result 2) return the desired variable...like, return ($var1, $var2). //open remote site $fp = fopen($server, "r"); fpassthrough($fp); //this will display whatever the remote CGI sends to STDOUT //however, it will not process anything that is returned. That is, the PHP doesn't know wether the CGI evaluated to GOOD or BAD. That's as far as I've been able to get, I hope it helps. If you do find a better solution, then please send me a copy. I would appreciate it. __________John Monfort_________________ _+-----------------------------------+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___________________________________+- On Mon, 19 Feb 2001, Montgomery-Recht, Evan wrote: > Good morning... > > This should be a good monday morning question. > > I have a cgi-bin written in perl (it's actually, a interface to a > perl-module which is a interface to a telnet-like protocol). > > Anyways what I need to do is I have already existing code written in PHP, > but at some point I need to call this cgi-bin and get a return code from it > and process (good/bad result) and return to completed php script that says > it called this cgi-bin. It's not very clear how to set the HTTP_POST_VARS > for sending to a post command (which doesn't seem to exist); > > Any ideas I don't see a function called: > > $HTTP_POST_VARS =set variables; > $result = > http_post("http://localhost/cgi-bin/script.pl"); > > Thanks, > > evan > > PS. I'd appricate a working example, even if it's a dummy version. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#40595) next »