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:[EMAIL PROTECTED] 
Sent: 11 December 2004 15:26
To: Dave Carrera; [EMAIL PROTECTED]
Subject: Re: [PHP] I need to pass vars to external cgi script ?


> From: "Dave Carrera" <[EMAIL PROTECTED]>

> 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
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to