latest changes requested to remove ID number and date of birth
[namibia] / public / min / builder / ocCheck.php
1 <?php 
2 /**
3  * AJAX checks for zlib.output_compression
4  * 
5  * @package Minify
6  */
7
8 $_oc = ini_get('zlib.output_compression');
9  
10 // allow access only if builder is enabled
11 require dirname(__FILE__) . '/../config.php';
12 if (! $min_enableBuilder) {
13     header('Location: /');
14     exit();
15 }
16
17 if (isset($_GET['hello'])) {
18     // echo 'World!'
19     
20     // try to prevent double encoding (may not have an effect)
21     ini_set('zlib.output_compression', '0');
22     
23     require $min_libPath . '/HTTP/Encoder.php';
24     HTTP_Encoder::$encodeToIe6  = true; // just in case
25     $he = new HTTP_Encoder(array(
26         'content' => 'World!'
27         ,'method' => 'deflate'
28     ));
29     $he->encode();
30     $he->sendAll();
31
32 } else {
33     // echo status "0" or "1"
34     header('Content-Type: text/plain');
35     echo (int)$_oc;
36 }