Re: I need to pass vars to external cgi script ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: "Dave Carrera" <dave@xxxxxxxxxxxx>

> 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=my_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

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux