Forum Moderators: coopster
ob_start('ob_gzhandler'); echo str_replace($find,$replace,ob_get_clean()); <?php
ob_start();//Start the initial buffer, do NOT use compression here.
//Content output here.
$c = str_replace($find,$replace,ob_get_contents());//String replacement.
ob_end_clean();//Close buffering.
ob_start('ob_gzhandler');//Start a fresh buffer with compression.
echo $c;//Output the original buffer.
ob_end_flush();//Send to the client.
?>