RE: [PHP] I need to pass vars to external cgi script ?

From: Date: Sat, 11 Dec 2004 15:40:21 +0000
Subject: RE: [PHP] I need to pass vars to external cgi script ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-204062@lists.php.net to get a copy of this message
Thanks John, I get "fopen expects second param" when I call it. What would this be ? "r" "w" "x" or something else ? Thanks for the help Dave Carrera -----Original Message----- From: John Holmes [mailto:holmes072000@charter.net] Sent: 11 December 2004 15:26 To: Dave Carrera; php-general@lists.php.net Subject: Re: [PHP] I need to pass vars to external cgi script ? > From: "Dave Carrera" <dave@ephgroup.com> > I need to send some vars to a cgi script. > > The script url is like this > > > http://www.example.com/cgi-bin/script.cgi?var1=my_first_php_var;var2=m > y_seco > nd_php_var and so on. > > How do I send / call this script from inside my php script ? $file = fopen('http://www.example.com/cgi-bin/script.cgi?var1=my_first_php_var&var2= my_second_php_var&var3=...'); or $file = fopen("http....script.cgi?var1=$phpvar1&var2=$phpvar2..."); although you'd want to urlencode() the PHP variables if you need something like the second method. ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.809 / Virus Database: 551 - Release Date: 09/12/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.809 / Virus Database: 551 - Release Date: 09/12/2004

« previous php.general (#204062) next »