Wikka Mod 008

Type: Feature Addition

Credit:

PatrickPaul
http://www.wikini.net/


Implemented gzip encoding.

File modified: /wakka.php


// create wakka object
$wakka = new Wakka($wakkaConfig);

function compress_output($output)
{
    return gzencode($output);
}

// Check if the browser supports gzip encoding, HTTP_ACCEPT_ENCODING
if (strstr ($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') )
{
    // Start output buffering, and register compress_output() (see
    // below)
    ob_start ("compress_output");

    // Tell the browser the content is compressed with gzip
    header ("Content-Encoding: gzip");
}




Why not use simple
ob_start("ob_gzhandler");
instead?

-- RomanIvanov,
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki