tags:

views:

75

answers:

1

I want code in a php5 page be executed after all of the page (or maybe even after the first part of the page) is displayed.

I would prefer no javascript and no frames / iframes and no redirects. Just one page written in php, only emitting html.

I remember some special function in php5 to register a callback function that will be executed after the content is sent to the browser, but could not find, did I dream this?

What are the most common ways to do this? I am on Linux / Apache.

It is not necessary to write a complete example, if you just name the ways or describe the trick and I lookup the details for myself

Edit: Now I am asking another question about the execution of the shutdown function here:

http://stackoverflow.com/questions/1686783/how-to-make-sure-the-user-cannot-interrupt-execution-of-php-code-called-by-regis

+3  A: 

Are you looking for register_shutdown_function()?

soulmerge
thank you for the fast answer, this is it :-) cool thank you!
Sven Larson