Re: How to get intermediate script results to browser?
From: J.O. Aho (user_at_example.net)
Date: Tue, 30 Nov 2004 09:24:03 +0100
> did some experimentation over the last few hours. I found out that
> Netscape 7.1 lets me see my echo output, line for line, when I use the php
> flush() function. I couldn't figure out why this wouldn't happen with
> Internet Explorer, so I found an IE forum and got the answer. Apparently
> IE will not print out anything unless it is at least 256 characters long!
Wow, I wonder why people do develope sites and only support MSIE, this would
be another reason why people shouldn't use it. I'm quite happy that my
platform don't have that product.
> I would rather do things this way for this particular application (we are
> the only users) because this way I am only running one PHP script at a
> time. I am sort of afraid to use the exec() fork idea, because if
> something goes wrong, people get angry when they start getting multiple
> newsletters in their email boxes, and I am too lazy to write the code that
> would insure that they didn't.
I do agree, but if you had to go with the forking, then you could have added
one column for storing the mail id (subject or an internal id-number), and
each time a mail has been sent, you update this column, this would lessen the
risk for resending a mail to a person.
> By the way, it was my meaning to have a true exit() in my example
>> header("Location ... etc. ");
>> // code for slow running execution loop here
Okey, didn't know how your script looked like, could have continued a good bit
after that point.
You haven't talked with your webhotel about setting up a proper maillist, I
would think a such could work better, and you would only have to send one mail
from your php script. Of course you would need to to have a script to generate
the memberlist, but that shouldn't be to complicated. Just an idea that could
lessen the time spent to send the mail and less risk that the script will die
in the wrong place.