|
Posted by Hilarion on 09/30/05 12:42
Neil Trigger <nt018a9036@blueyonder.co.uk> wrote:
> provided it doesn't time out I'm perfectly able and willing to do that.
As I wrote:
>> it's not that difficult to create a script / program, that is able to
>> work within some time limitations.
If you have control over server timeout settings, then you can
turn it off for the mailing script (for example by "set_time_limit"
function). To prevent the browser timeout you'll have to send
some data to the browser periodically. I do it by sending number
of address processed and a total number of addresses after each
e-mail sent (eg. echo $i . '/' . count($addr) . "<br />\n"). You should
also remember to turn off the output buffering or flush the buffers
(because if you do not, then the output will not be sent to the browser).
I also record information about which addresses were already
processed in my DB, so even if the script is terminated (due
to timeout or user intervention), it can be rerun and continue
from the exact place where is stopped. You could also record
that info when the script is stopped (using some handler), but
I find recording all the info "on the fly" more reliable.
Hilarion
Navigation:
[Reply to this message]
|