# wp-optimize/3.3.2/vendor/mrclay/minify/builder/ocCheck.php

WP-Optimize – Cache, Compress images, Minify &amp; Clean database to boost page speed &amp; performance, version 3.3.2. 37 lines.

- Page: https://pluginprobe.com/plugins/wp-optimize/3.3.2/code/vendor/mrclay/minify/builder/ocCheck.php
- Raw: https://pluginprobe.com/plugins/wp-optimize/3.3.2/raw/vendor/mrclay/minify/builder/ocCheck.php
- Modified: 2021-06-07T22:42:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-optimize/3.3.2/code/vendor/mrclay/minify/builder/ocCheck.php#L10-L20`.

```php
<?php
/**
 * AJAX checks for zlib.output_compression
 *
 * @package Minify
 */

$app = (require __DIR__ . '/../bootstrap.php');
/* @var \Minify\App $app */

$_oc = ini_get('zlib.output_compression');
 
// allow access only if builder is enabled
if (!$app->config->enableBuilder) {
    header('Location: /');
    exit;
}

if ($app->env->get('hello')) {
    // echo 'World!'
    
    // try to prevent double encoding (may not have an effect)
    ini_set('zlib.output_compression', '0');
    
    HTTP_Encoder::$encodeToIe6  = true; // just in case
    $he = new HTTP_Encoder(array(
        'content' => str_repeat('0123456789', 500),
        'method' => 'deflate',
    ));
    $he->encode();
    $he->sendAll();
} else {
    // echo status "0" or "1"
    header('Content-Type: text/plain');
    echo (int)$_oc;
}

```
