|
Posted by gosha bine on 08/13/07 07:51
On 11.08.2007 21:41 Fabio wrote:
> "ELINTPimp" <smsiebe@gmail.com> ha scritto nel messaggio
> news:1186860780.947564.220510@k79g2000hse.googlegroups.com...
>
>> PHP, being an extreamly veristile language, can be made to do many
>> thing with enough imagination =). First, we really need to know what
>> you are doing, how, and why. By you using the term 'asynchronous', I
>> assume you probably a good amount about programming and threads. So,
>> I'm not trying to assault you're judgement, but wanting to help you in
>> the best way.
>>
>> On way to do this is to call a/multiple CLI scripts from your base PHP
>> script, let them process in the background, do some more things if you
>> would like with your "base" script, and get back to them, reading the
>> results later on (if you want).
>>
>
> Ok, I thank you and I'll explain.
> In a web site page, when someone press a submit button I should exec a
> mail() function to send an email to each registered user.
> The execution of mail() is a little slow, so if the user list is a little
> long who pressed the button need to wait to obtain the interaction with the
> site.
> My idea is to exec all the calls to mail() in background, so the interation
> is immediate and if the mail sending use some "hidden" minutes it's not a
> problem.
>
> I hope I was clear wth my english and newbie php language :)
>
> Thanks again.
>
>
I think you'd be better off having a mail sender cronjob running
independently from your web application. The application only creates a
working set for the cronjob (e.g. populates a database table or similar).
--
gosha bine
makrell ~ http://www.tagarga.com/blok/makrell
php done right ;) http://code.google.com/p/pihipi
[Back to original message]
|