bool header_register_callback ( callback $callback )
Registers a function that will be called when PHP starts sending output. The callback is executed just after PHP prepares all headers to be sent, and before any other output is sent, creating a window to manipulate the outgoing headers before being sent.
Returns TRUE on success or FALSE on failure.