Hiya,
    Perhaps I don't mean threads!

    Basically I have a PHP script which is in a website, and runs when a
certain input is recieved and it is quite complicated, and may take quite a
time to finish, as it will be sending quite a few emails. The emails do not
have to be sent straight away, and the emails are all customised with date
from the database.

    What I could do I suppose is to call set_time_limit(0) to stop the
script timing out, but I don't want to have the user waiting for the script
to finish before he/she sees the next page.

    What are the options? I was thinking I could:

        1- Run another script using the command line version, system call.
But it is going live on Linux, but tested on Windows. And don't want to have
to alter the code for the live version. Think you have to call PHP
differently on the two platforms.
        2- Do some sort of URL call from the PHP code? Is this possible. I
mean like call a script, and pass arguements in the URL. And just ignore it,
it can take as long as it wants, sort of do it in a seperate thread.
        3- Somehow ask for some specific PHP code to work in a seperate
thread.

    Is this possible? Any other ideas? Which is the best way? What is the
PHP way!

    If I was doing something like this in Java, probably set a class running
in another thread.

    Many thanks,

    Steve




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

Reply via email to