My script is called by server. From server I\'ll receive ID_OF_MESSAGE
and TEXT_OF_MESSAGE
.
In my script I\'ll handle incoming text and ge
If you're using FastCGI processing or PHP-FPM, you can:
session_write_close(); //close the session
ignore_user_abort(true); //Prevent echo, print, and flush from killing the script
fastcgi_finish_request(); //this returns 200 to the user, and processing continues
// do desired processing ...
$expensiveCalulation = 1+1;
error_log($expensiveCalculation);
Source: https://www.php.net/manual/en/function.fastcgi-finish-request.php
PHP issue #68722: https://bugs.php.net/bug.php?id=68772