Re: pipe email to php?
| From: | Hank Marquardt | Date: | Sat, 24 Nov 2001 18:06:49 +0000 |
| Subject: | Re: pipe email to php? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-75618@lists.php.net to get a copy of this message | ||
Open stdin and go to town --
#!/usr/bin/php4 -q
<?
$fp = fopen("php://stdin","r");
while(!feof($fp)) {
$buffer=fgets($fp,8192);
echo ++$cnt." $buffer";
}
fclose($fp);
?>
On Sun, Nov 25, 2001 at 12:20:10AM +0530, Kunal Jhunjhunwala wrote:
> Hey,
> Ive looked.. and tried... nothing seems to work.. any ideas on how to pipe
> email to a php script? Ive already setup the valias.. the big question is,
> how to process the info when the email comes in..
> kunal
>
>
> --
> 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
>
--
Hank Marquardt <hank@yerpso.net>
http://web.yerpso.net
GPG Id: 2BB5E60C
Fingerprint: D807 61BC FD18 370A AC1D 3EDF 2BF9 8A2D 2BB5 E60C
*** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD
*** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild
*** Beginning PHP -- Starts January 7, 2002
*** See http://www.hwg.org/services/classes