Your IP : 216.73.216.229


Current Path : /home/jeromecohp/www/aesecure/premium/third/smartoptimizer/minifiers/
Upload File :
Current File : /home/jeromecohp/www/aesecure/premium/third/smartoptimizer/minifiers/html.php

<?php
   // @file : /premium/third/smartoptimizer/minifiers/html.php
   // @version : 2.0.2
   // @author : AVONTURE Christophe - christophe@aesecure.com
   // @copyright : (C) 2013-2015 - Christophe Avonture - all right reserved.
   // @url : http://www.aesecure.com/
   // @package : 2015-02-14 13:37:46
   // @license : This program is a commercial software.  You CAN'T redistribute it and/or modify it.
   // Source code is the property of Christophe Avonture and can't be reused, in whole or in part, in any programs.
?>
<?php
function minify_html($str){
$search = array('/\>[^\S ]+/s','/[^\S ]+\</s','/(\s)+/s');
$replace = array('>','<','\\1');if(preg_match("/\<html/i",$str) == 1&&preg_match("/\<\/html\>/i",$str) == 1){
$str = preg_replace($search,$replace,$str);}
$replace = array("#<!--.*?-->#s" => "");
$search = array_keys($replace);
$str = preg_replace($search,$replace,$str);
return trim($str);}