[pmwiki-users] Cron question (was Newsletter throttling)

The Editor editor at fast.st
Mon Oct 30 04:12:18 CST 2006

Marc shared with me an awesome little snippet that should avoid the
use of cron based on dokuwiki's indexer function or something, which
allows you to return something simple to the screen, fool the browser
into disconnecting from the script (so it's free), and then continues
on to your actual php work separately.

There was also a good suggestion to use sleep( ) between each email,
to throttle the newsletter, meaning you wouldn't have to split your
list up into a bunch of little pieces.  This would be nice for small
groups (say a small forum where you might want to have messages go out
immediately), or whereyou don't have email limitations on the server.

These two suggestions should make the code extremely easy to put
together, and avoid having to use cron.  Thanks bunches!  Can't wait
to get started...


PS.  If anyone is curious, here is the snippet I plan to try and use:

function sendGIF(){
    header('Content-Type: image/gif');
    header('Content-Length: '.strlen($img));
    header('Connection: Close');
    print $img;

// Start the real work now...

More information about the pmwiki-users mailing list