Server IP : 80.241.246.6 / Your IP : 216.73.216.167 Web Server : Apache/2.4.25 (Debian) System : Linux kharagauli 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64 User : www-data ( 33) PHP Version : 7.0.33-0+deb9u12 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/kharagauli1/compress/ |
Upload File : |
<?php /* @author suxoza <suxoza@gmail.com> */ $type = $_GET['type']; header('Content-type: text/'.$type.'; charset=utf-8'); ob_start("compress"); if($type == 'css' || $type == 'js'){ $explode = ($_GET['data'])?explode('|',trim(base64_decode(str_rot13(substr($_GET['file'],10,-21))))):explode('|',$_GET['file']); for($i = 0; $i < count($explode); $i++){ if(file_exists('../'.$type.'/'.$explode[$i].'.'.$type) || file_exists('../'.$type.'/'.$explode[$i].'.php')){ require_once (file_exists('../'.$type.'/'.$explode[$i].'.'.$type))?'../'.$type.'/'.$explode[$i].'.'.$type:'../'.$type.'/'.$explode[$i].'.php'; } } } ob_end_flush(); function compress($buffer){ if($_GET['type'] == 'css'){ $buffer = trim($buffer); $buffer = str_replace("\r\n", "\n", $buffer); $search = array("/\/\*[^!][\d\D]*?\*\/|\t+/","/\s+/", "/\}\s+/"); $replace = array(null," ", "}\n"); $buffer = preg_replace($search, $replace, $buffer); $search = array("/;[\s+]/","/[\s+];/","/\s+\{\\s+/", "/\\:\s+\\#/", "/,\s+/i", "/\\:\s+\\\'/i","/\\:\s+([0-9]+|[A-F]+)/i","/\{\\s+/","/;}/"); $replace = array(";",";","{", ":#", ",", ":\'", ":$1","{","}"); $buffer = preg_replace($search, $replace, $buffer); $buffer = str_replace("\n", null, $buffer); }elseif($_GET['type'] == 'js'){ require_once 'compress.php'; $return = new JavaScriptPacker($buffer, 'Normal', true, false); $buffer = $return->pack(); }return $buffer; }