Re: Writing to process STDIN and reading its STDOUT from PHP4?

From: Date: Thu, 21 Sep 2000 15:30:28 +0000
Subject: Re: Writing to process STDIN and reading its STDOUT from PHP4?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-17246@lists.php.net to get a copy of this message
http://www.php.net/manual/html/function.fopen.html The manual has some information about php defined constants "php://stdin", "php://stdout", or "php://stderr" Does this help? Robert Zwink http://zwink.levitate.org ----- Original Message ----- From: "Steve Hsieh" <steveh@eecs.umich.edu> To: <php-general@lists.php.net> Sent: Saturday, September 16, 2000 6:40 PM Subject: [PHP] Writing to process STDIN and reading its STDOUT from PHP4? > Can someone explain how I can send STDIN to a *process* and read its STDOUT > from PHP4? > > The only function I could find in the manual that seemed relevant was > popen(), but the manual says that it is unidirectional only. > > There must be a better way than than writing to a temp file and calling the > process via > popen("process < tmpfile", "r") ... I hope ? > > Anyone willing to provide a simple example of the best way to do this? > Suppose, for example, I have a paragraph of text contained in variable > $text, and I want to pass this to the STDIN of a binary called 'program' and > read its STDOUT back into PHP4. > > Thanks in advance! > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#17246) next »