Date: 05/01/00
- Next message: Rossi Designs: "Re: [PHP3] homesite plugin?"
- Previous message: Rick Proctor: "[PHP3] PHP4 Win32 Setup"
- In reply to: Dieter Kneffel: "[PHP3] PHP CGI-Version: read from stdin/pipe"
- Next in thread: Dieter Kneffel: "Re: [PHP3] PHP CGI-Version: read from stdin/pipe"
- Reply: Dieter Kneffel: "Re: [PHP3] PHP CGI-Version: read from stdin/pipe"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, May 01, 2000 at 05:33:53AM +0200, Dieter Kneffel wrote:
> Is there a way to handle input from a pipe in php?
>
> Using the CGI-Version of php, I am looking for an
> equal solution to this simple shell-script:
>
> ------ this is an example shell script -------
> #!/bin/sh
> # Read stdin
> #
> while read LINE
> do
> TEXT=${LINE}
> break
> done
> ------ this is an example shell script end-------
>
> $TEXT now contains the piped input.
>
> Anyone did this before?
$fp = fopen("php://stdin", "r");
while(($buf=fgets($fp, 512)) != false) {
...
}
- Sascha
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Rossi Designs: "Re: [PHP3] homesite plugin?"
- Previous message: Rick Proctor: "[PHP3] PHP4 Win32 Setup"
- In reply to: Dieter Kneffel: "[PHP3] PHP CGI-Version: read from stdin/pipe"
- Next in thread: Dieter Kneffel: "Re: [PHP3] PHP CGI-Version: read from stdin/pipe"
- Reply: Dieter Kneffel: "Re: [PHP3] PHP CGI-Version: read from stdin/pipe"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

