PHP Task delegation....as such....
Posted: Mon Jan 20, 2003 1:29 pm
Is there a way for a PHP script to activate the processing of another PHP function so that it can return data to the client without having to wait for the activated functions to finish?
For example, I have a PHP script that handles large amounts of form data. Some functions will return an "All Ok" page to the client. But only after all the non-client functions are completed, such as database functions and confirmation emails to the webmaster, thus slowing down the time for the page to be sent back to the client. Is there a way for these functions to be run in their own 'thread' so to speak? So the page will be sent back to the client whilst the server processes the other stuff not required for that page?
For example, I have a PHP script that handles large amounts of form data. Some functions will return an "All Ok" page to the client. But only after all the non-client functions are completed, such as database functions and confirmation emails to the webmaster, thus slowing down the time for the page to be sent back to the client. Is there a way for these functions to be run in their own 'thread' so to speak? So the page will be sent back to the client whilst the server processes the other stuff not required for that page?