RE: [PHP] stdin in php 4.01pl2

From: Date: Fri, 01 Sep 2000 12:42:07 +0000
Subject: RE: [PHP] stdin in php 4.01pl2
Groups: php.general 
Request: Send a blank email to php-general+get-14803@lists.php.net to get a copy of this message
Hi, I asked last, so I answer first :-) our solution was (works perfect - reads line by line, unquote fread and get an unstopped flow) : #!/usr/local/bin/php <?php $fd = fopen('php://stdin','r'); if (!$fd) exit(); $baba = fgets($fd, 1000); # $baba = fread($fd,128); print $baba; fclose($fd); ?> -> put into a file, make executable shell# program_delivering_output | this_script.php andreas (made a httpd logparser with that ...)

« previous php.general (#14803) next »