Hi
I've had a good browse of the articles on-line and this seems to be a question which has not been answered.
I want to take the pipe channel of the standard input into a PHP script, obviously I know that it will have to be a command line version of PHP.
I can do this in Perl without any trouble but all my libraries are in PHP and that's what I need to use to drive the web-side of the application.
I can't find a reference to certain standard channels anywhere in the manual thus that:
cat file.txt | php myscript.php
Cant seem to use:
<?
$f = fopen("<>","r");
while (!feof($f)) {
echo fgets($f,1024) . "\n";
}
fclose($f);
?>
In case you need some background, i'm receiving a stream from a mail server's input channel via pipe, I need to read a database and act accordingly, passing some of the data to one place and some of the data to another. Perl doesn't provide (in my opinion) easy ways to split up and manage the content of an e-mail.
I've seen this kind of application done before but either in Perl or directly in C++ built into the core of the SMTP service.
Hope someone can tell me if its at least possible.
Kind Regards
James Brindle