At 23:23 12.03.2003, Kris said:
--------------------[snip]--------------------
>Is it possible to some how thread a php script threw apache. There has to be
>something you can do, it seems there is always something you can do :)
>What I want is the following.
>I administer a mailing list that has a few hundred thousand subscribed
>recipients.
>I've written a script that runs threw the DB and validates the email
>address.
>First by format then by connecting to the mail server.
>This script takes way to long to run as it has to do one at a time.
>I want to some how thread this so it can be validating multiple emails at a
>time.
>Please excuse my ignorance on the subject my web programming experience is
>rather limited.
--------------------[snip]-------------------- 

Well, web is (or at least should be) kind of real-time, thus you should try
to postpone lengthy actions.

What I'd try (and I already did such stuff with success) is to just create
some DB entries, in your case this would mean to add a "validation request"
entry to a database, or even simply a "todo" file.

Another process, most certainly run by a cron job, would then read the DB
(or the toto file) and perform actions necessary. When done it would update
some kind of status flag.

On your website yo could display something like "187322 addresses scheduled
for validation - 123499 to go", or something like that, just by reading the
status data updated by the cron job.


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to