PHP Salt


A little dash of PHP... my collection of php functions

Version: 2.17.4
Last Build: July 22, 2017 23:41pm (PST)

psOBStart()
Start output buffering with compression


Description:

A simple way to start output compression.
This also checks to see if the browser accepts the encoding


Usage:

psObStart();


Example:

	psObStart();



Code:

function psOBStart()
{
global $_SERVER;
if ( substr_count(strtolower($_SERVER['HTTP_ACCEPT_ENCODING']),"gzip") > 0 )
{
ob_start("ob_gzhandler"); // now gzip the output
}
}

Changlelog:


See Also

And a shot out to:

LinuxSimple - www.linuxsimple.com
PHP - php.net
Fedora Server - getfedora.com
Shameless ads to pay for site