T
techusky
First off, I am not sure where exactly to post this, so I'm posting to
both php.general and here...
My general problem is that I am wondering if there is a(n effective)
way to send an array from a PHP script to a Perl script. I am
developing a simple Perl script to handle automated e-mails from my
website (which is written exclusively in PHP). I would ordinarily just
stick with PHP as far as e-mailing is concerned, but I have found it
to be much more a pain trying to connect to my Gmail account via
sockets to send e-mail; the Perl route is much simpler in my opinion.
I have a form on my website that will let me specify to which users
from my site I would like to send the e-mail. Upon submitting the
form, the PHP script parses the e-mail addresses from
$_POST['user_emails'] and puts them into an array. Then what happens
is that I do something to the effect of:
foreach($user_emails as $user) {
[some code omitted here that generates the perl script]
shell_exec("perl \"./email.user.pl\"");
}
Essentially, what this does is sends out individual e-mails to each
user (it takes roughly 5-8 seconds for it to send out one e-mail, so
you can imagine if I try to send to 100 users that it takes quite a
while). But we all know that you can send a single e-mail to many
different people at the same time... This is why I am trying to send
PHP's array to my Perl script, because I could then easily add each
element in the array to one e-mail.
Any ideas? Sorry if my problem isn't clear (or if there is some
stupidly simple solution I am not thinking of... I'm not that fluent
in Perl yet).
both php.general and here...
My general problem is that I am wondering if there is a(n effective)
way to send an array from a PHP script to a Perl script. I am
developing a simple Perl script to handle automated e-mails from my
website (which is written exclusively in PHP). I would ordinarily just
stick with PHP as far as e-mailing is concerned, but I have found it
to be much more a pain trying to connect to my Gmail account via
sockets to send e-mail; the Perl route is much simpler in my opinion.
I have a form on my website that will let me specify to which users
from my site I would like to send the e-mail. Upon submitting the
form, the PHP script parses the e-mail addresses from
$_POST['user_emails'] and puts them into an array. Then what happens
is that I do something to the effect of:
foreach($user_emails as $user) {
[some code omitted here that generates the perl script]
shell_exec("perl \"./email.user.pl\"");
}
Essentially, what this does is sends out individual e-mails to each
user (it takes roughly 5-8 seconds for it to send out one e-mail, so
you can imagine if I try to send to 100 users that it takes quite a
while). But we all know that you can send a single e-mail to many
different people at the same time... This is why I am trying to send
PHP's array to my Perl script, because I could then easily add each
element in the array to one e-mail.
Any ideas? Sorry if my problem isn't clear (or if there is some
stupidly simple solution I am not thinking of... I'm not that fluent
in Perl yet).