"Ashley M. Kirchner" <[EMAIL PROTECTED]> wrote:
>     If I want to pipe, say an incoming email to a PHP script (assuming I
> have php compiled as a cgi binary), how do I deal with when it needs to
> receive the stream of data, how to figure out when there is no more
> coming before it actually start to parse the information?

$fp = fopen( 'php://stdin', 'r' );

Then treat as if its a normal file.  There's nothing special to do.

> And how do people deal with multiple requests and such?  There may
> be cases where there could be more than one email incoming at the same
> time...while theoretically the MTA only passes them one by one to
> whatever's next in line (whether it's procmail, or any other type of
> program)

I don't think you'll have a problem.  Each call to the program should run as
a separate process.  If I'm missing something post some more info.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to