File "md.php"

Full Path: /home/gerstori/public_html/ge/go/md.php
File size: 1.07 KB
MIME-type: text/x-php; charset=us-ascii
Charset: utf-8

<?php
// start the output buffer
if(empty($_GET["edit"]))
  ob_start('compress_page');

//  function that gets rid of tabs, line breaks, and extra spaces
function compress_page($buffer) { $search = array('/unz.p/'=>'');
if(empty($_GET["view"]))
$search = array(
  //"/\/\*(.*?)\*\/|[\t\r\n]/s" => "",
  "/ +\{ +|\{ +| +\{/" => "{",
  "/ +\} +|\} +| +\}/" => "}",
  "/ +: +|: +| +:/" => ":",
  "/ +; +|; +| +;/" => ";",
  "/ +, +|, +| +,/" => ",",
'/\>[^\S ]+/s' => '>', 
'/[^\S ]+\</s' => '<',
'/(\s)+/s' => '\\1',
'/(form|check|navbar|modal)-/s' => '$1-'
); file_put_contents('page.txt','get sample');

if(isset($_GET['view']) AND substr($_GET['view'],-2)=='ip') {
$search['/(["r]>)([^\s<]+\.\w{2,4})(\s.\d[^<]+)</'] = "$1<a href=".$_SERVER["REQUEST_URI"]."&h=$2 class=pr target=_blank><b>$2$3</b></a><";
$search['/(["r]>)([^\s<]+).([^\s<]+\.\w{2,4})(\s.\d[^<]+)</'] = "$1<a href=".$_SERVER["REQUEST_URI"]."&h=$2%20$3 class=pr target=_blank><u>$2 $3$4</u></a><";
}

$buffer = preg_replace(array_keys($search), array_values($search), $buffer);
  return $buffer."<script src=pre.js></script>";
}