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
I use the php function register_shutdown_function for this.
void register_shutdown_function ( callable $callback [, mixed $parameter [, mixed $... ]] )
http://php.net/manual/en/function.register-shutdown-function.php
Edit: The above is not working. It seems I was misled by some old documentation. The behaviour of register_shutdown_function has changed since PHP 4.1 link link