Is there an "on exit" method, or a way of interacting with exit traffic using php? I tried googling an "on exit" routine with PHP but I just couldn't find anything.
PHP doesn't have this feature but javascript does. Use <body onUnload="javascriptFunction()"> Code (markup):
This isn't possible with PHP whatsoever since PHP is a server side language, so all PHP code executes BEFORE the user ever sees the html it generates and sends to their client
Thanks both of you for the help! Answered my question completely (and the follow up question I had planned as well)
you can callback on fucntion ob_start <?php function callback($buffer) { // remplace toutes les pommes par des carottes return (ereg_replace("pommes de terre", "carottes", $buffer)); } ob_start("callback"); ?>