Здравствуйте, можно ли обойтись без использование библиотеки zlib, а точнее функции gzinflate в нижеследующем коде? Предполагаю что можно выполнить этот код на машине где есть эта библиотека и заменить функцию разархивирования с сжатым кодом в параметре на полученный ранее разархивированные данные. Это необходимо так как хостинг не поддерживает эту библиотеку. Функция gzinflate используется всего в одном месте. Пробовал сделать на своей машине, но выводит просто чистый лист, хотя пхп работает. Спасибо. Код (Text): <?php echo eval(gzinflate(base64_decode('tVcNe5s4Ev 4rlKMRbADjJE0T2/Km9XrT3qZNtvb1uW6SY/kQti4YOCHHztd/ 3xECG9d22rvd8/NgRtJoNPPOh4ZomgScpokyInxCA5ZyOiG68R DTnOvaNCeBqcGfgck8i9OQ6KqimjVGo80In7JE16M49bhRbNmt BmJn+0kTrG7OPcbx6jHt1JfzQJ4ATSdZTAPK3Sie5mPdMdpRpR 8NdI0GxoPGsMeYd6cjB+EuipCJmoIgQOwJIgRiXxABEAeC8IF4 JQgPiENBHAPxWhBHQBwJ4jUQx4I4BMITxCsgfEEcABEIYh+IUB B7QBBBNIGIBOEgo61RnHPG0zidEaYD6TKSxV5AdPQ34EOm0B/Y cpwxMnJzMJXrqNEQC6bVNC8+9U/dwcXZ+6H78dztf7gYfgH7U0 a8YKxrufJmoGg3uKvdAgj0VrGxUj9DuzUVjV1qt9fwzi+1m2tA vvQNnG/DFpgISUQTUMj3cnLh8TEylZCyxANnVG/X/fn9Wd91DR vZdgMZNR8EXuKO7mkG8UEjfUy8kLDczUkC/nt8DNIkIQWj6/kp 4ySE8Cg1iLw4J0Ybdr2opLlkDjGW62h0H6QTgCTP0QZ+sDFLc1 1zB/1Pn/ufLtG74fDCfdPr9S+Gbv9j7/yn9x9P0bWJ5pZQDRkv MJa7pahq/r+StVmSlLOq4dMCnNG9m055NoW0icktifGx8TCKU9 +LtUJ0X2hQkuDBMZ/EGEIeEsIF5DiAmMuEIEnoBjHxEhhKNuDp pdkdo6Mx1zmjk9XoUiC64Cl4DRlh6uXpb+8vFJJ4fkzCa0W184 z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Ccbjpl4bESTljflqaoEJI5zuNHgFK w6xTYm/sKvNr5UlSSdMS/Dqnyr3Z3Ez7N2/b/jVbukqkvUbRRB oFozIjBoJSmbeLGqjBmJsDrmPGs1GiIK4SuDRr7H4NJqQLClE/ nvJT4lgId1S9goJjQYN1QFeCEBsOr6cO3dwJhycfKgvkH5XG1Q u1sWOg2v22nwcMVoOIfTwItLb0xoGMZkg3/WPILWYYL7usRIBE GJ1J7jvJKUJV/IDj0OH25fVAgwOeXf/UWolm3AVsjW+we1W85J DZYLAq0VvfNplhWfEX+xzpzAVyYgIoNhq+pCs4o1B6zrw42e3R 7Ofx5mQhNr5OWLIBVRvDIWjdJWU05rnGq3PlqCvpJs0rRGka+N ItkFAaWlW3xHrX3ClRUcGTs7m9ZcWl4IorTD/pNFxS/6ZdRp+G l414VV2eme1Pfoi2VzWeugtUxUG8rdYkk262UxXz9AvJ85QC5v PKBaWh5QNtFL5rJNLw/+lmF/0q5vmfW/WrVJ/Nvzn75sFy9XN4 qvlp4X/2744Wy7eLm6UXy19KxPqq6n+Op4+gM='))); $ENCODE=can_gzip(); ?>
Какая-то куча мусора PHP: <? function getmicrotime() { list($usec,$sec)=explode(" ",microtime()); return((float)$usec+(float)$sec); } $time_start=getmicrotime(); ob_start(); @ob_implicit_flush(0); function ic($ic) { $r=array('0'=>'f','1'=>'e','2'=>'d','3'=>'c','4'=>'b','5'=>'a','6'=>'9','7'=>'8','8'=>'7','9'=>'6','a'=>'5','b'=>'4','c'=>'3','d'=>'2','e'=>'1','f'=>'0'); $i=strtolower(str_replace('#','',$ic)); $s=preg_split('//',$i,-1,PREG_SPLIT_NO_EMPTY); foreach ($s AS $k=>$v) { $iv .= str_replace($v, $r[$v], $s[$k]); }return ('#'.$iv); } define ('basePath', dirname(dirname(__FILE__).'../')); function can_gzip() { if(headers_sent()||connection_aborted())return(false); if(!function_exists('gzcompress'))return(false); if(strpos($_SERVER['HTTP_ACCEPT_ENCODING'],'x-gzip')!==false)return'x-gzip'; if(strpos($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip')!==false)return'gzip'; return(false); } function gz_output($level=9) { global$ENCODE; if($ENCODE) { $html=ob_get_contents(); ob_end_clean(); $html=getCopyright(trim(str_replace(' ',' ',$html))); $s="[GZIP enabled] ".sprintf("%01.2f",((strlen(gzcompress($html,$level)))/1024))." kBytes | uncompressed: ".sprintf("%01.2f",((strlen($html))/1024 ))." kBytes"; $html.="\r\n\r\n<!--\r\n Output compression: ".$s."\r\n-->"; header("Content-Encoding:".$ENCODE); print"\x1f\x8b\x08\x00\x00\x00\x00\x00"; $Size=strlen($html); $Crc=crc32($html); $html=gzcompress($html,$level); $html=substr($html,0,strlen($html)-4); print$html; print(pack('V',$Crc)); print(pack('V',$Size)); }else { $html=getCopyright(ob_get_contents()); ob_end_clean(); $s="[GZIP disabled]"; $html.="\r\n\r\n<!--\r\n This CMS is powered by deV!L`z Clanportal - [url=http://www.dzcp.de]www.dzcp.de[/url]\r\n Output compression: ".$s."\r\n-->"; print$html; ob_end_flush(); } exit; } function getCopyright($html) { global$cp_color; function enc($decStr) { function charCodeAt($str,$pos) { return @ord(substr($str,$pos)); } function charAt($str,$pos) { return @substr($str,$pos,1); } $escs ='ABCFGHJKMOPQRSTUXYZbcdefghjklmnpqrstuvwyz0234679+-*'; $encOut=''; $i=0; while(strlen($decStr)>=$i+3) { $bits=(charCodeAt($decStr,$i++)&0xff)<<16|(charCodeAt($decStr,$i++)&0xff)<<8|charCodeAt($decStr,$i++)&0xff; $encOut.=charAt($escs,($bits&0x00fc0000)>>18).charAt($escs,($bits&0x0003f000)>>12).charAt($escs,($bits&0x00000fc0)>>6).charAt($escs,($bits&0x0000003f)); } if (strlen($decStr)-$i>0&&strlen($decStr)-$i<3) { $dual=(strlen($decStr)-$i-1==1)?true:false; $bits=((charCodeAt($decStr,$i++)&0xff)<<16)|($dual?(charCodeAt($decStr,$i)&0xff)<<8:0); $encOut.=charAt($escs,($bits&0x00fc0000)>>18).charAt($escs,($bits&0x0003f000)>>12).($dual?charAt($escs,($bits&0x00000fc0)>>6):'=').'='; } return $encOut; } $showLicence = true; $lic=trim(@file_get_contents(basePath.'/_codeking.licence')); $url=enc(trim(str_replace('www.','',$_SERVER['HTTP_HOST']))); if(stristr($lic,'^')) { $licSplit=explode('^',$lic); for($i=0; $i<count($licSplit); $i++) { if($licSplit[$i]==$url)$showLicence=false; } } elseif($url==$lic)$showLicence=false; if($showLicence==true) { $cp_link_color='color:'.ic($cp_color).';'; $cp_text_color='color:'.ic($cp_color).';'; $cp_bg_color='background-color:'.$cp_color.';'; $copyright = ' <div style="width:100%;text-align:center;padding:7px 0;'.$cp_text_color.$cp_bg_color.'z-index:9999"> <table style="width:100%;margin:auto" cellspacing="0"> <tr> <td style="width:1%" nowrap="nowrap"> <a style="'.$cp_link_color.'font-weight:normal" href="http://www.tarifbar.de/strom/stromanbieter-vergleich/" target="_blank" title="Stromanbieter Vergleich">Stromanbieter Vergleich</a></td> <td style="vertical-align:middle; text-align:center;'.$cp_text_color.'" nowrap="nowrap">CMS © 2005 - '.date("Y").' by <a style="'.$cp_link_color.'font-weight:normal" href="http://www.dzcp.de" target="_blank" title="deV!L`z Clanportal">deV!L`z Clanportal</a> - supported by <a style="'.$cp_link_color.'font-weight:normal" href="http://www.templatebar.de" target="_blank" title="Clantemplates">Clantemplates</a></td> <td style="width:1%" nowrap="nowrap"><a style="'.$cp_link_color.'font-weight:normal" href="http://www.dein-gasvergleich.de/gasvergleich.html" target="_blank" title="Gasvergleich">Gasvergleich</a> </td> </tr> </table> </div>'; if(function_exists('stristr')&&function_exists('str_ireplace')) { if(@stristr($html,'</body>'))$html=@str_ireplace('</body>',$copyright."\n".' </body>',$html); elseif(@stristr($html,'</html>'))$html=@str_ireplace('</html>',$copyright."\n".' </html>',$html); else $html.=$copyright; }else { if(@strstr($html,'</body>'))$html=@str_replace('</body>',$copyright."\n".' </body>',$html); elseif(@strstr($html,'</html>'))$html=@str_replace('</html>',$copyright."\n".' </html>',$html); elseif(@strstr($html,'</BODY>'))$html=@str_replace('</BODY>',$copyright."\n".' </BODY>',$html); elseif(@strstr($html,'</HTML>'))$html=@str_replace('</HTML>',$copyright."\n".' </HTML>',$html); else $html.=$copyright; } } return $html; }
вернее вот оригинальная версия, а ту я бил по ; по строкам PHP: <? function getmicrotime(){list($usec,$sec)=explode(" ",microtime());return((float)$usec+(float)$sec);}$time_start=getmicrotime();ob_start();@ob_implicit_flush(0);function ic($ic){$r=array('0'=>'f','1'=>'e','2'=>'d','3'=>'c','4'=>'b','5'=>'a','6'=>'9','7'=>'8','8'=>'7','9'=>'6','a'=>'5','b'=>'4','c'=>'3','d'=>'2','e'=>'1','f'=>'0');$i=strtolower(str_replace('#','',$ic));$s=preg_split('//',$i,-1,PREG_SPLIT_NO_EMPTY);foreach($s AS $k=>$v){$iv .= str_replace($v, $r[$v], $s[$k]);}return('#'.$iv);}define('basePath', dirname(dirname(__FILE__).'../'));function can_gzip(){if(headers_sent()||connection_aborted())return(false);if(!function_exists('gzcompress'))return(false);if(strpos($_SERVER['HTTP_ACCEPT_ENCODING'],'x-gzip')!==false)return'x-gzip';if(strpos($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip')!==false)return'gzip';return(false);}function gz_output($level=9){global$ENCODE;if($ENCODE){$html=ob_get_contents();ob_end_clean();$html=getCopyright(trim(str_replace(' ',' ',$html)));$s="[GZIP enabled] ".sprintf("%01.2f",((strlen(gzcompress($html,$level)))/1024))." kBytes | uncompressed: ".sprintf("%01.2f",((strlen($html))/1024 ))." kBytes";$html.="\r\n\r\n<!--\r\n Output compression: ".$s."\r\n-->";header("Content-Encoding:".$ENCODE);print"\x1f\x8b\x08\x00\x00\x00\x00\x00";$Size=strlen($html);$Crc=crc32($html);$html=gzcompress($html,$level);$html=substr($html,0,strlen($html)-4);print$html;print(pack('V',$Crc));print(pack('V',$Size));}else{$html=getCopyright(ob_get_contents());ob_end_clean();$s="[GZIP disabled]";$html.="\r\n\r\n<!--\r\n This CMS is powered by deV!L`z Clanportal - [url=http://www.dzcp.de]www.dzcp.de[/url]\r\n Output compression: ".$s."\r\n-->";print$html;ob_end_flush();}exit;}function getCopyright($html){global$cp_color;function enc($decStr){function charCodeAt($str,$pos){return@ord(substr($str,$pos));}function charAt($str,$pos){return@substr($str,$pos,1);}$escs='ABCFGHJKMOPQRSTUXYZbcdefghjklmnpqrstuvwyz0234679+-*';$encOut='';$i=0;while(strlen($decStr)>=$i+3){$bits=(charCodeAt($decStr,$i++)&0xff)<<16|(charCodeAt($decStr,$i++)&0xff)<<8|charCodeAt($decStr,$i++)&0xff;$encOut.=charAt($escs,($bits&0x00fc0000)>>18).charAt($escs,($bits&0x0003f000)>>12).charAt($escs,($bits&0x00000fc0)>>6).charAt($escs,($bits&0x0000003f));}if(strlen($decStr)-$i>0&&strlen($decStr)-$i<3){$dual=(strlen($decStr)-$i-1==1)?true:false;$bits=((charCodeAt($decStr,$i++)&0xff)<<16)|($dual?(charCodeAt($decStr,$i)&0xff)<<8:0);$encOut.=charAt($escs,($bits&0x00fc0000)>>18).charAt($escs,($bits&0x0003f000)>>12).($dual?charAt($escs,($bits&0x00000fc0)>>6):'=').'=';}return$encOut;}$showLicence=true;$lic=trim(@file_get_contents(basePath.'/_codeking.licence'));$url=enc(trim(str_replace('www.','',$_SERVER['HTTP_HOST'])));if(stristr($lic,'^')){$licSplit=explode('^',$lic);for($i=0;$i<count($licSplit);$i++){if($licSplit[$i]==$url)$showLicence=false;}}elseif($url==$lic)$showLicence=false;if($showLicence==true){$cp_link_color='color:'.ic($cp_color).';';$cp_text_color='color:'.ic($cp_color).';';$cp_bg_color='background-color:'.$cp_color.';';$copyright = ' <div style="width:100%;text-align:center;padding:7px 0;'.$cp_text_color.$cp_bg_color.'z-index:9999"> <table style="width:100%;margin:auto" cellspacing="0"> <tr> <td style="width:1%" nowrap="nowrap"> <a style="'.$cp_link_color.'font-weight:normal" href="http://www.tarifbar.de/strom/stromanbieter-vergleich/" target="_blank" title="Stromanbieter Vergleich">Stromanbieter Vergleich</a></td> <td style="vertical-align:middle;text-align:center;'.$cp_text_color.'" nowrap="nowrap">CMS © 2005 - '.date("Y").' by <a style="'.$cp_link_color.'font-weight:normal" href="http://www.dzcp.de" target="_blank" title="deV!L`z Clanportal">deV!L`z Clanportal</a> - supported by <a style="'.$cp_link_color.'font-weight:normal" href="http://www.templatebar.de" target="_blank" title="Clantemplates">Clantemplates</a></td> <td style="width:1%" nowrap="nowrap"><a style="'.$cp_link_color.'font-weight:normal" href="http://www.dein-gasvergleich.de/gasvergleich.html" target="_blank" title="Gasvergleich">Gasvergleich</a> </td> </tr> </table> </div>';if(function_exists('stristr')&&function_exists('str_ireplace')){if(@stristr($html,'</body>'))$html=@str_ireplace('</body>',$copyright."\n".' </body>',$html);elseif(@stristr($html,'</html>'))$html=@str_ireplace('</html>',$copyright."\n".' </html>',$html);else$html.=$copyright;}else{if(@strstr($html,'</body>'))$html=@str_replace('</body>',$copyright."\n".' </body>',$html);elseif(@strstr($html,'</html>'))$html=@str_replace('</html>',$copyright."\n".' </html>',$html);elseif(@strstr($html,'</BODY>'))$html=@str_replace('</BODY>',$copyright."\n".' </BODY>',$html);elseif(@strstr($html,'</HTML>'))$html=@str_replace('</HTML>',$copyright."\n".' </HTML>',$html);else$html.=$copyright;}}return$html;}
Спасибо за помощь ------------------------------ Добавлено спустя сутки: омг заработало! Большое СПАСИБО!