Name

ob_gzhandler

Synopsis

string ob_gzhandler(string buffer[, int mode])

This function gzip-compresses output before it is sent to the browser. You don’t call this function directly. Rather, it is used as a handler for output buffering using the ob_start( ) function. To enable gzip-compression, call ob_start( ) with this function’s name:

<?php ob_start("ob_gzhandler"); ?>

Get Programming PHP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.