RE: [PHP] PHP script and external C program
| From: | John Holmes | Date: | Mon, 27 May 2002 18:28:31 +0000 |
| Subject: | RE: [PHP] PHP script and external C program | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99389@lists.php.net to get a copy of this message | ||
I don't have example code, but what you want is the exec() function. Be
careful passing user variables to a command line program.
www.php.net/exec
---John Holmes...
> -----Original Message-----
> From: ing.Martin Prášek [mailto:prasek@silesia.cz]
> Sent: Monday, May 27, 2002 1:21 PM
> To: php-general@lists.php.net
> Subject: [PHP] PHP script and external C program
>
> Problem. I have a php 4.0.6. on linux as Apache module. I need to do
> folowing:
>
> I have in my script some value, for example "$value"
> and
> in /bin on my linux box c language program called "something". (I need
> speed) .
>
> I need to parse $value thru stdin /bin/something program to get from
its
> stdout a $parsed_value.
>
> How to run external program (for example /bin/something ), write to
its
> STDIN $value and then read from its STDOUT to variable
$parsed_value ?
>
>
> Example code needed.
>
>
> thanx