Hi all,
Well, I gave it a try but still no go. I may not have explained
things well. Here's a brief rundown on how this is supposed to work.
1. Click "send" to begin to send the emails.
2. I now need to start TWO php scripts - one that sends the emails
and reloads itself multiple times until each batch of emails has been
sent, AND one that tracks the email sending progress, which is done
through AJAX reading MySQL tables that are updated by the sending
script.
So essentially, there is a fork in the road and both roads need to be
traveled at the same time. Would curl be a good idea for this? I know
I could use cron, but that would only work for a "scheduled" script
run and no an "on demand".
Again, any help would be appreciated.
Mark
--------------------
On Sep 6, 2007, at 1:50 AM, Tiago Relvão wrote:
> I believe it might have something to do with your browser caching ajax
> request. Try changing the url adding a timestamp, or/and setting of
> the
> cache using php headers.
>
> What about using cron, or any other scheduler to call the script on a
> specific time rate? It would only send e-mails if your database has
> anything
> pending.
>
> Tiago
>
> On 9/6/07, Mark Wheeler <[EMAIL PROTECTED]> wrote:
>>
>> Hi all,
>>
>> I've an interesting problem here. Here's the scenario. This script is
>> sending emails for our company newsletter. It used to run the script
>> once, but now I need to call the script multiple times and send out
>> batches of emails. This is because I need to slow down the rate at
>> which the emails are going out. I've got that working nicely, but
>> here's the problem. If I call the script by itself, it reloads over
>> and over fine until all emails have been sent. But, because I am
>> wanting the script to work in the background, and not have to have
>> the browser window open during the sending, I load another page after
>> about two seconds of time has passed to monitor the progress via ajax
>> and mysql. The problem is when I do that, the script that sends the
>> mail will not reload. I was under the impression that it would keep
>> reloading in the background until I said stop, but that is not
>> happening. I am using the header('Location: .....') to reload the
>> page. Is there another way to reload the page until it's done running
>> the times I need it to run? Should I not use the header() call but
>> something else?
>>
>> Any help is greatly appreciated.
>>
>> Thanks,
>>
>> Mark
>>
>>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> The php_mysql group is dedicated to learn more about the PHP/MySQL
> web database possibilities through group learning.
> Yahoo! Groups Links
>
>
>