• File: md.php
  • Full Path: /home/gerstori/public_html/cgi-bin/cgi-bin/du/md.php
  • Date Modified: 07/15/2026 10:00 AM
  • File size: 672 bytes
  • MIME-type: text/x-php; charset=us-ascii
  • Charset: utf-8
<?php
// start the output buffer
if(empty($_GET["edit"]) AND empty($_GET["view"]))
  ob_start('compress_page');

//  function that gets rid of tabs, line breaks, and extra spaces
function compress_page($buffer) {
// remove comments, tabs, spaces, newlines, etc.
$search = array(
  //"/\/\*(.*?)\*\/|[\t\r\n]/s" => "",
  "/ +\{ +|\{ +| +\{/" => "{",
  "/ +\} +|\} +| +\}/" => "}",
  "/ +: +|: +| +:/" => ":",
  "/ +; +|; +| +;/" => ";",
  "/ +, +|, +| +,/" => ",",
'/\>[^\S ]+/s' => '>', 
'/[^\S ]+\</s' => '<',
'/(\s)+/s' => '\\1',
'/(form|check|navbar|modal)-/s' => '$1-'
);
$buffer = preg_replace(array_keys($search), array_values($search), $buffer);
  return $buffer;
}