(PHP 4 >= 4.0.2)
string ob_get_length(void);
string ob_get_length
This will return the length of the contents in the output buffer or FALSE, if output buffering isnt't active.
See also ob_start() and ob_get_contents().