Looks good. I'm working on some new features to be announced shortly, which may benefit from this. I'm playing around with it now to see how it will work.
Recommendation... you can change this:
PHP Code:
<?php
ob_start();
// output
$buffer_raw = ob_get_contents();
ob_end_clean();
?>
to this:
PHP Code:
<?php
ob_start();
// output
$buffer_raw = ob_get_clean();
?>
ob_get_clean() requires PHP 4.3.0 or higher. On the off chance that you have an older version, we have a built in function that simulates it in older versions.