NYCPHP Meetup

NYPHP.org

[nycphp-talk] broadcast emailer: is this sane strategy

drydell at att.net drydell at att.net
Mon Aug 16 19:17:52 EDT 2004


Just as an aside, it's possible to fork a detached php process, all you need to do is turn off stdin and stdout (and you should trap output/errors to a log):

exec("/path/to/php /your/script.php 2>>/your/logfile.log >&- <&- >>/your/logfile.log");

> When they click Send -- this is the part that I think merits some thinking
> -- I've decided to do a sort of poor man's fork. That is, I write the
> message body to a temporary file; then I execute myself with an exec()
> call with args $to, $subject, $message_filename and redirect any output to
> /dev/null; then I say "see ya later" to the browser.



More information about the talk mailing list