Re: [PHP] Pipe To A Program

2011-11-12 Thread tamouse mailing lists
On Sat, Nov 12, 2011 at 1:38 AM, Ron Piggott
ron.pigg...@actsministries.org wrote:
 Does anyone know what variable the e-mail message is assigned within the 
 context of “Pipe To A Program”?  Is there a way to find out?  I can’t figure 
 this out.

 What I have tried so far is below:

 ===
 #!/usr/local/bin/php -q
 ?php


 foreach($_REQUEST as $key = $val) {
     $$key = $val;

 $email_body .= KEY:  . $key . \r\n;
 $email_body .= VAL:  . $val . \r\n;
 $email_body .= \r\n;

 }

 mail( user@domain , Test Pipe To Program , $email_body );
 ===

 The mail command works, but the e-mail message body is empty.   I am at a 
 loss of how to proceed.

 Ron

I'm not sure what's going on with your program, exactly. Here's what I
tried:

start script
?php

foreach($_REQUEST as $key = $val) {
$$key = $val; // do not know what this is supposed to do here...

$email_body .= wordwrap(KEY:  . $key . \n,70,\n);
$email_body .= wordwrap(VAL:  . $val . \n,70,\n);
$email_body .= \n;

}

print_r($email_body);

mail( 'tamara@localhost' , Test Pipe To Program , $email_body );
end script

(Note: according to http://us3.php.net/manual/en/function.mail.php:

Each line should be separated with a LF (\n). Lines should not be
larger than 70 characters.

Which is why I added the wordwrap on each line and terminated the
lines with \n instead of \r\n.)

Calling the script, print_r showed the string as expected:

start output
tamara@caesar:~/$ curl 'http://localhost/~tamara/testmail.php?a=1b=2c=3'
KEY: a
VAL: 1

KEY: b
VAL: 2

KEY: c
VAL: 3

end output

And the email message showed up in my inbox:

tamara@caesar:~/$ from
www-data@caesar   Test Pipe To Program

And the contents of the email are:

start email
Return-Path: www-data@caesar
Delivery-Date: Sat Nov 12 02:54:13 2011
Envelope-to: tamara@localhost
Return-path: www-data@caesar
Received: from www-data by caesar with local (masqmail 0.2.27) id
 1RP9Lp-0oD-00 for tamara@localhost; Sat, 12 Nov 2011 02:54:13 -0600
To: tamara@localhost
Subject: Test Pipe To Program
X-PHP-Originating-Script: 1000:testmail.php
From: www-data@caesar
Date: Sat, 12 Nov 2011 02:54:13 -0600
Message-ID: 1RP9Lp-0oD-00@caesar


KEY: a
VAL: 1

KEY: b
VAL: 2

KEY: c
VAL: 3
end email

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pipe To A Program

2011-11-12 Thread Ron Piggott



I used your code and it still didn't work.  Would you show me what you put 
in for your Pipe To A Program settings?


What I used is:

Rules: To Contains customer service e-mail address

Action
/usr/local/bin/php /path/to/email_to_ticket_gateway.php

- I know the rule is working because I receive an empty e-mail, just not 
passing the e-mail content




Ron Piggott



www.TheVerseOfTheDay.info

-Original Message- 
From: tamouse mailing lists

Sent: Saturday, November 12, 2011 4:04 AM
To: Ron Piggott
Cc: php-general@lists.php.net
Subject: Re: [PHP] Pipe To A Program

On Sat, Nov 12, 2011 at 1:38 AM, Ron Piggott
ron.pigg...@actsministries.org wrote:
Does anyone know what variable the e-mail message is assigned within the 
context of “Pipe To A Program”?  Is there a way to find out?  I can’t 
figure this out.


What I have tried so far is below:

===
#!/usr/local/bin/php -q
?php


foreach($_REQUEST as $key = $val) {
$$key = $val;

$email_body .= KEY:  . $key . \r\n;
$email_body .= VAL:  . $val . \r\n;
$email_body .= \r\n;

}

mail( user@domain , Test Pipe To Program , $email_body );
===

The mail command works, but the e-mail message body is empty.   I am at a 
loss of how to proceed.


Ron


I'm not sure what's going on with your program, exactly. Here's what I
tried:


start script

?php

foreach($_REQUEST as $key = $val) {
   $$key = $val; // do not know what this is supposed to do here...

   $email_body .= wordwrap(KEY:  . $key . \n,70,\n);
   $email_body .= wordwrap(VAL:  . $val . \n,70,\n);
   $email_body .= \n;

}

print_r($email_body);

mail( 'tamara@localhost' , Test Pipe To Program , $email_body );

end script


(Note: according to http://us3.php.net/manual/en/function.mail.php:

Each line should be separated with a LF (\n). Lines should not be
larger than 70 characters.

Which is why I added the wordwrap on each line and terminated the
lines with \n instead of \r\n.)

Calling the script, print_r showed the string as expected:


start output

tamara@caesar:~/$ curl 'http://localhost/~tamara/testmail.php?a=1b=2c=3'
KEY: a
VAL: 1

KEY: b
VAL: 2

KEY: c
VAL: 3


end output


And the email message showed up in my inbox:

tamara@caesar:~/$ from
www-data@caesar Test Pipe To Program

And the contents of the email are:


start email

Return-Path: www-data@caesar
Delivery-Date: Sat Nov 12 02:54:13 2011
Envelope-to: tamara@localhost
Return-path: www-data@caesar
Received: from www-data by caesar with local (masqmail 0.2.27) id
1RP9Lp-0oD-00 for tamara@localhost; Sat, 12 Nov 2011 02:54:13 -0600
To: tamara@localhost
Subject: Test Pipe To Program
X-PHP-Originating-Script: 1000:testmail.php

From: www-data@caesar

Date: Sat, 12 Nov 2011 02:54:13 -0600
Message-ID: 1RP9Lp-0oD-00@caesar


KEY: a
VAL: 1

KEY: b
VAL: 2

KEY: c
VAL: 3
end email 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pipe To A Program

2011-11-12 Thread tamouse mailing lists
On Sat, Nov 12, 2011 at 5:12 AM, Ron Piggott
ron.pigg...@actsministries.org wrote:


 I used your code and it still didn't work.  Would you show me what you put
 in for your Pipe To A Program settings?

 What I used is:

 Rules: To Contains customer service e-mail address

 Action
 /usr/local/bin/php /path/to/email_to_ticket_gateway.php

 - I know the rule is working because I receive an empty e-mail, just not
 passing the e-mail content

This sounds more like a CPanel question than a PHP question, however,
if your action above is what gets executed, there will be no $_REQUEST
global as it is run as a cli program.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pipe To A Program

2011-11-12 Thread Stuart Dallas
On 12 Nov 2011, at 07:38, Ron Piggott wrote:

 I am looking at CPanel’s “E-Mail filtering” option “Pipe To A Program”
 http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/FilterOptions
 
 The goal I am working towards is saving the contents of an incoming e-mail 
 address into a mySQL table.  I am thinking of trying to program a customer 
 contact center application.
 
 Does anyone know what variable the e-mail message is assigned within the 
 context of “Pipe To A Program”?  Is there a way to find out?  I can’t figure 
 this out.  
 
 What I have tried so far is below:
 
 ===
 #!/usr/local/bin/php -q
 ?php
 
 
 foreach($_REQUEST as $key = $val) {
 $$key = $val;
 
 $email_body .= KEY:  . $key . \r\n;
 $email_body .= VAL:  . $val . \r\n;
 $email_body .= \r\n;
 
 }
 
 mail( user@domain , Test Pipe To Program , $email_body );
 ===
 
 The mail command works, but the e-mail message body is empty.   I am at a 
 loss of how to proceed.


When you pipe email to a program the mail server literally does that - it pipes 
the contents of the email to the stdin of your program.

In PHP you would then read the email contents like so...

$email = file_get_contents('php://stdin');

Note that what you get is the raw email, complete with headers. When I do this 
in PHP I use the Mailparse extension: http://php.net/book.mailparse

Here's a (somewhat over-complicated) example from an old version of TwitApps 
when I processed Twitter email notifications: https://gist.github.com/1360403

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pipe To A Program

2011-11-12 Thread Stuart Dallas
On 12 Nov 2011, at 11:49, Ron Piggott wrote:

 Ok.  It works.  I finally am able to display the contents of an e-mail!  Now 
 I am able to write my apps
 
 I see your monster of all incoming e-mail processors ;)  Thanks for showing 
 me this.  I will look it over when I am more awake.  I kind of get it right 
 now, but I need to look more closely.

Good stuff. I've resurrected an article that used to be on my site that 
explains that example code in a bit more detail: 
http://stut.net/2011/11/12/handling-email-notifications/ - hopefully that will 
make it less of a monster :)

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


 -Original Message- From: Stuart Dallas
 Sent: Saturday, November 12, 2011 6:21 AM
 To: Ron Piggott
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Pipe To A Program
 
 On 12 Nov 2011, at 07:38, Ron Piggott wrote:
 
 I am looking at CPanel’s “E-Mail filtering” option “Pipe To A Program”
 http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/FilterOptions
 
 The goal I am working towards is saving the contents of an incoming e-mail 
 address into a mySQL table.  I am thinking of trying to program a customer 
 contact center application.
 
 Does anyone know what variable the e-mail message is assigned within the 
 context of “Pipe To A Program”?  Is there a way to find out?  I can’t figure 
 this out.
 
 What I have tried so far is below:
 
 ===
 #!/usr/local/bin/php -q
 ?php
 
 
 foreach($_REQUEST as $key = $val) {
$$key = $val;
 
 $email_body .= KEY:  . $key . \r\n;
 $email_body .= VAL:  . $val . \r\n;
 $email_body .= \r\n;
 
 }
 
 mail( user@domain , Test Pipe To Program , $email_body );
 ===
 
 The mail command works, but the e-mail message body is empty.   I am at a 
 loss of how to proceed.
 
 
 When you pipe email to a program the mail server literally does that - it 
 pipes the contents of the email to the stdin of your program.
 
 In PHP you would then read the email contents like so...
 
   $email = file_get_contents('php://stdin');
 
 Note that what you get is the raw email, complete with headers. When I do 
 this in PHP I use the Mailparse extension: http://php.net/book.mailparse
 
 Here's a (somewhat over-complicated) example from an old version of TwitApps 
 when I processed Twitter email notifications: https://gist.github.com/1360403
 
 -Stuart
 
 -- 
 Stuart Dallas
 3ft9 Ltd
 http://3ft9.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Pipe To A Program

2011-11-11 Thread Ron Piggott

I am looking at CPanel’s “E-Mail filtering” option “Pipe To A Program”
http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/FilterOptions

The goal I am working towards is saving the contents of an incoming e-mail 
address into a mySQL table.  I am thinking of trying to program a customer 
contact center application.

Does anyone know what variable the e-mail message is assigned within the 
context of “Pipe To A Program”?  Is there a way to find out?  I can’t figure 
this out.  

What I have tried so far is below:

===
#!/usr/local/bin/php -q
?php


foreach($_REQUEST as $key = $val) {
 $$key = $val;
 
$email_body .= KEY:  . $key . \r\n;
$email_body .= VAL:  . $val . \r\n;
$email_body .= \r\n;

}

mail( user@domain , Test Pipe To Program , $email_body );
===

The mail command works, but the e-mail message body is empty.   I am at a loss 
of how to proceed.

Ron

RE: [PHP] Pipe an email to PHP

2003-08-30 Thread Thomas Tremain

I resolved my problem several days later, and I thought I might post it for
those that come up behind me.

I had several blank lines in my .php file after the closing ?

This caused an output of the script (even though I could not see it) which
generated the failure notice within Exim. 


Thomas Tremain
www.LiveHost.net
www.GotoNames.com
www.TrafficExaminer.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Pipe an email to PHP

2003-08-27 Thread Thomas Tremain
 
I'm sure this question has been visited before, but I've had some troubles
searching through 
the archives.
 
This is at least a two part question.
 
I wish to use a pipe instead of the pop3 class, because I wish the email to
start the script 
instead of waiting for a cronjob.
 
1)  The pipe itself:
On a cPanel server, I wish to setup an email address with a pipe like:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] :
|/home/account/public_html/mailtools/emailscript.php
 
This always gives me an error saying it cannot foraward.
 
If I pipe it to |/usr/bin/php
/home/account/public_html/mailtools/emailscript.php
it tells me: No input file specified.
 
2) to read the data:
 
I wish to parse the data into $from  $subject and $body
 
The data will then be manipulated, and key pieces of data will be extracted 
and sent to either a database or an instant message to my cell phone. (this 
part I've already solved)
 
 
Thomas Tremain
www.LiveHost.net http://www.LiveHost.net 
www.GotoNames.com http://www.GotoNames.com 
www.TrafficExaminer.com http://www.TrafficExaminer.com 
 
 
 
 


Re: [PHP] Pipe an email to PHP

2003-08-27 Thread Greg Donald

  
 I'm sure this question has been visited before, but I've had some troubles
 searching through 
 the archives.
  
 This is at least a two part question.
  
 I wish to use a pipe instead of the pop3 class, because I wish the email to
 start the script 
 instead of waiting for a cronjob.
  
 1)  The pipe itself:
 On a cPanel server, I wish to setup an email address with a pipe like:
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] :
 |/home/account/public_html/mailtools/emailscript.php

I would read the data from the pipe with STDIN:

$fp = fopen(php://stdin, r);
while(!feof($fp)) $buffer .= fgets($fp, 4096);
fclose($fp);

 This always gives me an error saying it cannot foraward.
  
 If I pipe it to |/usr/bin/php
 /home/account/public_html/mailtools/emailscript.php
 it tells me: No input file specified.

I use something like that in my .procmailrc:

:0 fw
| /usr/bin/spamassassin

:0
* ^X-Spam-Status: Yes
{
:0 c
| $HOME/.spamassassin/spamcop.php
:0
spam
}


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Pipe an email to PHP

2003-08-27 Thread Thomas Tremain

I have attempted to create a .procmailrc that looks like:

:0
* [EMAIL PROTECTED]
| $HOME/emailtest.php

I have also removed the forwarder from my /etc/valiases file.

Now I get:  The following address(es) failed: [EMAIL PROTECTED]

Can I be sure Procmail is even handling my email? I thought Exim and
MailScanner took care of that.



-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]



 This always gives me an error saying it cannot foraward.
  
 If I pipe it to |/usr/bin/php
 /home/account/public_html/mailtools/emailscript.php
 it tells me: No input file specified.

I use something like that in my .procmailrc:

:0 fw
| /usr/bin/spamassassin

:0
* ^X-Spam-Status: Yes
{
:0 c
| $HOME/.spamassassin/spamcop.php
:0
spam
}


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pipe an email to PHP

2003-08-27 Thread David T-G
Thomas --

...and then Thomas Tremain said...
%  
% I'm sure this question has been visited before, but I've had some troubles
% searching through 
% the archives.

What sort of trouble?  Just trouble finding a helpful answer, or actual
trouble performing a search?


%  
% This is at least a two part question.
%  
% I wish to use a pipe instead of the pop3 class, because I wish the email to
% start the script 
% instead of waiting for a cronjob.

Makes sense.


%  
% 1)  The pipe itself:
% On a cPanel server, I wish to setup an email address with a pipe like:
% [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] :
% |/home/account/public_html/mailtools/emailscript.php
%  
% This always gives me an error saying it cannot foraward.

Is emailscript.php marked as executable and does it have a proper shebang
line at the top?


%  
% If I pipe it to |/usr/bin/php
% /home/account/public_html/mailtools/emailscript.php
% it tells me: No input file specified.

Hmmm...  How does your code look?


%  
% 2) to read the data:
%  
% I wish to parse the data into $from  $subject and $body

Greg's STDIN suggestion sounds good to me.  Read the thing in and look
for ^From:, ^Date:, and ^$; everything after the blank line is the body.
Strip the signature for bonus points.


%  
% The data will then be manipulated, and key pieces of data will be extracted 
% and sent to either a database or an instant message to my cell phone. (this 
% part I've already solved)

Well, that's something ;-)


%  
%  
% Thomas Tremain
% www.LiveHost.net http://www.LiveHost.net 
% www.GotoNames.com http://www.GotoNames.com 
% www.TrafficExaminer.com http://www.TrafficExaminer.com 


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] Pipe an email to PHP

2003-08-27 Thread Marek Kilimajer
Is emailtest.php executable, does it start with #!/usr/bin/php, is $HOME 
set?

Thomas Tremain wrote:

I have attempted to create a .procmailrc that looks like:

:0
* [EMAIL PROTECTED]
| $HOME/emailtest.php
I have also removed the forwarder from my /etc/valiases file.

Now I get:  The following address(es) failed: [EMAIL PROTECTED]

Can I be sure Procmail is even handling my email? I thought Exim and
MailScanner took care of that.


-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]



This always gives me an error saying it cannot foraward.

If I pipe it to |/usr/bin/php
/home/account/public_html/mailtools/emailscript.php
it tells me: No input file specified.


I use something like that in my .procmailrc:

:0 fw
| /usr/bin/spamassassin
:0
* ^X-Spam-Status: Yes
{
:0 c
| $HOME/.spamassassin/spamcop.php
:0
spam
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Pipe an email to PHP

2003-08-27 Thread Thomas Tremain

I am actually real close now...  Thanks to your help.

The email pipes to the PHP, and I get an email response from PHP so I can
look at output. However, I still get a non-delivery message at the same
time:

==
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  pipe to |php -q /home/mydomain/public_html/emailtest.php
generated by [EMAIL PROTECTED]

The following text was generated during the delivery attempt:

-- pipe to |php -q /home/mydomain/public_html/emailtest.php
   generated by [EMAIL PROTECTED] --



-- This is a copy of the message, including all the headers. --
etc...
==

In my /etc/valiases/domain.com file:

[EMAIL PROTECTED]: |php -q /home/mydomain/public_html/emailtest.php
---
In emailtest.php:

#!/usr/bin/php -q
?
$pipe = fopen(php://stdin, r);
while(!feof($pipe))
{
$buffer .= fgets($pipe, 4096);
}
fclose($pipe);
//Shoot the data back to me so I can actually see the output
mail ([EMAIL PROTECTED],Autoresponce,$buffer);
?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Pipe $var to a shell command

2003-06-13 Thread Tim T
I have a mem var $myoutput I would like to pipe it to the input of a
shell_exec command.

I tried  shell_exec(command  $myoutput) however this is not quite right.
Anybody have any ideas??



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pipe $var to a shell command

2003-06-13 Thread Leif K-Brooks
If $myoutput is foo, it will attempt to get input from a file named 
foo.  Use command | $myoutput instead.

Tim T wrote:

I have a mem var $myoutput I would like to pipe it to the input of a
shell_exec command.
I tried  shell_exec(command  $myoutput) however this is not quite right.
Anybody have any ideas??


 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Pipe broken

2003-03-28 Thread Benja
Hi all,
is it possible to know in PHP if the client hit the stop button or close the
browser ?

Here is what I read on a forum :


 I was told you cannot when I asked 'way back when.

 When the user hits stop, the pipe is broken.
 Apache will attempt to spit out some more data, and will notice the pipe
 is broken, and will stop.
 But Apache doesn't inform PHP that the pipe broke.

 At least that's my vague recollection of what goes on.

More or less correct. Hopefully we will have this resolved soon.

-Rasmus


But it was in 1999 ! Is it possible to do it now ?

Thanks for your help,
Benja.

--
Benjamin Fonzé - [EMAIL PROTECTED]
WEB DEVELOPER
_

ELECTRONIC GROUP INTERACTIVE - www.electronic-group.com
World Trade Center, Moll de BARCELONA
Edificio Norte 4 Planta
08039 BARCELONA SPAIN
Tel : +34 93600 23 23 Fax : +34 93600 23 10
_



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pipe broken

2003-03-28 Thread Marek Kilimajer
Manual - Features - Connection handling

Benja wrote:

Hi all,
is it possible to know in PHP if the client hit the stop button or close the
browser ?
Here is what I read on a forum :


 

I was told you cannot when I asked 'way back when.

When the user hits stop, the pipe is broken.
Apache will attempt to spit out some more data, and will notice the pipe
is broken, and will stop.
But Apache doesn't inform PHP that the pipe broke.
At least that's my vague recollection of what goes on.
   

More or less correct. Hopefully we will have this resolved soon.

-Rasmus

But it was in 1999 ! Is it possible to do it now ?

Thanks for your help,
Benja.
--
Benjamin Fonzé - [EMAIL PROTECTED]
WEB DEVELOPER
_
ELECTRONIC GROUP INTERACTIVE - www.electronic-group.com
World Trade Center, Moll de BARCELONA
Edificio Norte 4 Planta
08039 BARCELONA SPAIN
Tel : +34 93600 23 23 Fax : +34 93600 23 10
_


 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Pipe broken

2003-03-28 Thread Benja
Oups... I missed that register_shutdown_function function.

Thanks Marek.
Benja.


Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Manual - Features - Connection handling

Benja wrote:

Hi all,
is it possible to know in PHP if the client hit the stop button or close
the
browser ?

Here is what I read on a forum :




I was told you cannot when I asked 'way back when.

When the user hits stop, the pipe is broken.
Apache will attempt to spit out some more data, and will notice the pipe
is broken, and will stop.
But Apache doesn't inform PHP that the pipe broke.

At least that's my vague recollection of what goes on.



More or less correct. Hopefully we will have this resolved soon.

-Rasmus


But it was in 1999 ! Is it possible to do it now ?

Thanks for your help,
Benja.

--
Benjamin Fonzé - [EMAIL PROTECTED]
WEB DEVELOPER
_

ELECTRONIC GROUP INTERACTIVE - www.electronic-group.com
World Trade Center, Moll de BARCELONA
Edificio Norte 4 Planta
08039 BARCELONA SPAIN
Tel : +34 93600 23 23 Fax : +34 93600 23 10
_









-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Pipe

2002-03-03 Thread Ken Tossell

What var is the piped data placed in?

Php 41 executable rhlinux 2417



-- 
PHP General Mailing List (http://wwwphpnet/)
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP] Pipe

2002-03-03 Thread Lars Torben Wilson

On Sun, 2002-03-03 at 19:32, Ken Tossell wrote:
 What var is the piped data placed in?
 
 Php 4.1 executable rhlinux 2.4.17

I'm gonna assume that you mean that you're doing something like this:

% cat somefile.txt | script.php

In which case, you'd need to fopen() the file 'php://stdin' and read
from it. 


Hope this helps,

Torben


-- 
 Torben Wilson [EMAIL PROTECTED]
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pipe email to php?

2001-11-24 Thread Michael Geier

The real question is why?  What is the purpose of piping the email to a
PHP script?

Are you trying to insert emails into a database?
Are you trying to deal with emails automatically based on subject?
Are you trying to deal with emails from a specific source?

The answers to these questions will change how a PHP script deals with the
input.

Also, you are piping the information to php://stdin and using fgetc() to
grab the data, correct?

.mg

[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] pipe email to php?

2001-11-24 Thread John S. Huggins

The forum PHP program package Phorum has something like this available.  I
believe it is a file called phorummail.php.

I remember using it as a basis for another program and it really does a
good job of indentifying and splitting headers and body of emails into
assorted variables.

On Sun, 25 Nov 2001, 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: [EMAIL PROTECTED]
-For additional commands, e-mail: [EMAIL PROTECTED]
-To contact the list administrators, e-mail: [EMAIL PROTECTED]
-

**

John Huggins
VANet
7101 Oriole Avenue
Springfield, VA 22150
703-912-6453
703-912-4831 fax

[EMAIL PROTECTED]
http://www.va.net/

**


-- 
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]




[PHP] pipe email to php?

2001-11-24 Thread Kunal Jhunjhunwala

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]