Re: How can I get a cgi result with a php script
| From: | Frank M. Kromann | Date: | Fri, 01 Dec 2000 17:01:20 +0000 |
| Subject: | Re: How can I get a cgi result with a php script | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-4230@lists.php.net to get a copy of this message | ||
Hi Patrick,
If I understand your question correct you can do this:
$fp=fopen("http://www.foreign.com/cgi-bin/script?var=something",
"rt");
if ($fp) {
$data = fread($fp, 1000);
fclose($fp);
}
- frank
>I have to call a cgi script from a foreign server with variable :
>http://www.foreign.com/cgi-bin/script?var=something
>the result is just a blank page with OK or KO
>how can I catch this result with php cause iti is not a variable it is just
>a fprint in perl ?
>
>I am working with php3
>thanks
>/-- Cyse Informatique --/
>Patrick SILVA
>psilva@cyse.net
>http://www.cyse.net
>105 avenue du Général LECLERC
>77400 Lagny sur Marne
>Tél : (33) 1 64 30 32 32
>Fax: (33) 1 64 30 32 22
>/----------------------------------/
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
>For additional commands, e-mail: php-windows-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>