| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2003-07-24 15:30 UTC] spagmoid at yahoo dot com
 Description: ------------ feature request: A way to close the connection with the client, while keeping the script running? Is this possible? Also helpful to do a flush that will result in final sending of data when using mod_gzip etc. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 07:00:01 2025 UTC | 
I am looking for the same feature. Here is the scenario: A user submits a form into script.php. The script needs to do two things: 1) Tell the user that the submission has been accepted. (It always is.) 2) Do some background processing on the submission and flag it if necessary. This takes up to half a minute, so I don't want to make the user wait for it to finish. So here is what I am trying to do: <? insert_submission_into_database($submission); ?> <html><body> <? echo("submission accepted"); ?> </html></body> <? close_connection_to_browser(); // currently not possible if (submission_bad()) flag_submission(); // no further info is sent to the browser ?>