Seite 1 von 1

fast and furious hack - was macht der?

Verfasst: 29.09.2004 15:27
von austrian-i
was bewirkt dieser hack? da steht irgendwas von gzip drin. das hab ich schon aktiviert. macht der irgendwas anderes auch noch?

Code: Alles auswählen

############################################### 
##   Hack Title:   phpBB2 Fast Hack 
##   Hack Version:   1.0.0 
##   Author:      dwing < dwing@weingarten-net.de > (Dimitri Seitz) http://www.weingarten-net.de 
##   Description:   This makes your phpBB 2 forum faster. 
##  
##   Updated to phpBB 2.0.6 Compatibility by: James Wong <james@jaeboy.net> 
##   Updated with permission from the original author. 
## 
##   Compatibility:   2.0.0 - 2.0.6 
## 
##   Installation Level: Easy 
##   Installation Time: 1 minute 
##   Files To Edit: <1> 
##      page_header.php 
##      file.php 
## 
##   Included Files: <0> 
##      N/A 
## 
##   History: 
##      <Version 1.0.0.1> :    2.0.6 Compliant 
##      <Version 1.0.0>   :    Initial Release :) 
## 
##   Author Notes: 
##     If you have questions or suggestions just mail me @    
##      dwing@weingarten-net.de?subject=FASTandFURIOUS. 
## 
##   Support:      http://www.phpbbhacks.com/forums 
## 
## 
############################################### 
##   You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads. 
##   Please visit http://www.phpbbhacks.com/forums for support. 
############################################### 
## 
############################################### 
##   This hack is released under the GPL License. 
##   This hack can be freely used, but not distributed, without permission. 
##   Intellectual Property is retained by the hack author(s) listed above. 
############################################### 
# 
#-----[ OPEN ]------------------------------------------ 
# 

includes/page_header.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
// 
// gzip_compression 
// 
$do_gzip_compress = FALSE; 
if ( $board_config['gzip_compress'] ) 
{ 
   $phpver = phpversion(); 

   $useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT; 

   if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) ) 
   { 
      if ( extension_loaded('zlib') ) 
      { 
         ob_start('ob_gzhandler'); 
      } 
   } 
   else if ( $phpver > '4.0' ) 
   { 
      if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') ) 
      { 
         if ( extension_loaded('zlib') ) 
         { 
            $do_gzip_compress = TRUE; 
            ob_start(); 
            ob_implicit_flush(0); 

            header('Content-Encoding: gzip'); 
         } 
      } 
   } 
} 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
// 
// gzip_compression 
// 
$do_gzip_compress = FALSE; 
if($board_config['gzip_compress']) 
{ 
   $phpver = phpversion(); 

   if($phpver >= "4.0.4pl1") 
      { 
         if(extension_loaded("zlib")) 
      { 
   if (headers_sent() != TRUE) 
      { 
         $gz_possible = isset($HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]) && eregi("gzip, deflate",$HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]); 
         if ($gz_possible) ob_start("ob_gzhandler"); 
      } 
   } 
      } 
         else if($phpver > "4.0") 
      { 
         if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) 
         { 
            if(extension_loaded("zlib")) 
         { 
            $do_gzip_compress = TRUE; 
            ob_start(); 
            ob_implicit_flush(0); 

            header("Content-Encoding: gzip"); 
         } 
      } 
   } 
}  

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# End

Verfasst: 29.09.2004 20:14
von plACEbo
Hi hab ihn grad mal ausprobiert.

Das Ergebnis ist niederschmetternd.
Ohne den Hack baut sich der Index in ca. 0.2sek auf.
Mit Hack sinds sage und schreibe über 4 Sekunden.

also keine Spur von FAST AND FURIOUS.

Matthias

Verfasst: 29.09.2004 20:42
von austrian-i
plACEbo hat geschrieben:niederschmetternd
ok das reicht mir als grund es nicht einzubauen, danke fürs testen :D