newcomer11
10-09-2007, 04:02 PM
I found a script ( PHP Hypercacher ) can enable cache in Vivvo 3.5 within 5 minutes :D
How to do this :
- Create a folder name : "_cache" in your home directory
- Chmod it to 777
- Backup your index.php file
- Open it, immediately after <?php insert this code :
//The begin tag of this file here
//<?php
/**** HEADER START -- HYPERCACHER-STANDARD v1.950 Powered By SoofMan 2007 http://www.hypercacher.com ****/
$qa=3600; //Cache refresh time
$qh=1800; //'Cache walker' time
$qp=86400; //'Cookie unlock' time
$qr=array(''); //'Exclude strings' array
$qe=array('_utm'); //Cookie names ignore array
$qz='_cache'; //Cache folder name
$qs=384; //Minimum file size of cache file
define('HCACHER_PRESENT',1);if(!function_exists('s f_mctf')){function sf_mctf(){list($a,$b)=explode(' ',microtime());return((float)$a+(float)$b);}}defin e('HCACHER_STARTTIME',sf_mctf());if(!defined('HCAC HER_DISABLED')){$wr=$_SERVER['REQUEST_URI'];if($_GET['dontdocache']||$_POST['dontdocache']||strpos($wr,'dontdocache')!==false)define('HCACHE R_DISABLED',1);foreach($qr as$wp){if(@strpos($_SERVER['REQUEST_URI'],$wp)!==false){define('HCACHER_DISABLED',1);break; }}if(!defined('HCACHER_DISABLED')){if($_GET['cachewalker']||$_POST['cachewalker']){setcookie('__cachewalker',(time()+$qh).'-'.rand(1000,9999),time()+$qh);setcookie('__ckunloc k','1',time()+$qp);}$wq=$_GET;$qm=$_POST;if($_COOK IE['__ckunlock']){$qd=$_COOKIE;foreach($qe as$wp){$wy=strtolower($wp);foreach($qd as$wo=>$wi){if(strpos(strtolower($wo),$wy)!==false)unset( $qd[$wo]);}}$qu=var_export($qd,true);}unset($wq['reloadcache'],$qm['reloadcache']);$qg=str_replace(array('reloadcache','dontdocache '),'',str_replace(array('&','?'),'',$wr));$qw=__FILE__.$_SERVER['PHP_SELF'].var_export($wq,true).var_export($qm,true).var_exp ort($_FILES,true).$qu.$qg;$ql=$_GET['reloadcache']||$_POST['reloadcache']||strpos($wr,'reloadcache')!==false;define('HCACHE R_CH_DIR',$qz.'/');define('HCACHER_REFRESH_TIME',$qa);define('HCAC HER_UNIQID','9v/e:Ona');$wt='Ej9A%&Q3';$qx=HCACHER_CH_DIR.md5(HCACHER_UNIQID.$qw.$wt) ;$qi=false;$qo=false;unset($we);if(@filesize($qx)>$qs){define('HCACHER_CH_TIME',time()-filemtime($qx));if($ql===false){if(HCACHER_CH_TIME<HCACHER_REFRESH_TIME){echo file_get_contents($qx);$ww='INFO: Using stored cache (1) (last cache time: '.HCACHER_CH_TIME.'), ';$g=round(sf_mctf()-HCACHER_STARTTIME,8);$ww.='CH_ON, Page generated in '.$g.' seconds';echo"\n<!--".HCACHER_UNIQID."-$ww-->";exit;}else{$we=1;$qi=1;$qo=1;$ww='INFO: Cache outdated - generating new (10)';}}else{$we=1;$qi=1;$qo=1;$ww='INFO: Cache reload requested (11)';}}else{$ww='INFO: No cache found (3)';$we=1;$qi=1;$qo=1;}define('HCACHER_MESSAGES', $ww);define('HCACHER_CACHEFILE',$qx);define('HCACH ER_WRITE_NEW',$qi);define('HCACHER_PRINT_PAGE',$qo );if($we)ob_start();}}
/**** HEADER END -- HYPERCACHER-STANDARD By SoofMan 2007 ****/
and at the end of this index.php file :
/**** FOOTER START -- HYPERCACHER-STANDARD v1.950 Powered By SoofMan 2007 http://www.hypercacher.com ****/
//if(defined('HCACHER_PRESENT')){if(!defined('HCACHE R_DISABLED')){if(HCACHER_WRITE_NEW>0){$ww=HCACHER_MESSAGES.', ';$qf=HCACHER_REFRESH_TIME+600;$qn=str_replace('</form','<input type="hidden" name="cachewalker" value="1"></form',ob_get_contents())."\x3c\x62\x72\x2f\x3e\x3c\x64\x69\x76\x20\x61\x6c\x 69\x67\x6e\x3d\x22\x63\x65\x6e\x74\x65\x72\x22\x3e \x3c\x61\x20\x73\x74\x79\x6c\x65\x3d\x22\x77\x68\x 69\x74\x65\x2d\x73\x70\x61\x63\x65\x3a\x6e\x6f\x77 \x72\x61\x70\x3b\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x 65\x3a\x31\x30\x70\x78\x3b\x22\x68\x72\x65\x66\x3d \x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x 68\x79\x70\x65\x72\x63\x61\x63\x68\x65\x72\x2e\x63 \x6f\x6d\x22\x3e\x43\x61\x63\x68\x65\x64\x20\x62\x 79\x20\x50\x48\x50\x2d\x48\x79\x70\x65\x72\x63\x61 \x63\x68\x65\x72\x3c\x2f\x61\x3e\x3c\x2f\x64\x69\x 76\x3e";ob_end_clean();$qk='(last cache time: '.HCACHER_CH_TIME.')';if(HCACHER_PRINT_PAGE>0)echo$qn;if($qt=@fopen(HCACHER_CACHEFILE,'w')){if (!fwrite($qt,$qn)){$ww.='ERROR: Failed to write cache (4), ';}else{$ww.='INFO: New cache written OK (5) '.$qk.', ';fclose($qt);}}else{$ww.='ERROR: Failed to write cache (6) '.$qk.', ';}$qy=0;$qb=HCACHER_CH_DIR;$qc=false;if(is_dir($q b)){if($qv=opendir($qb)){while((($wu=readdir($qv)) !==false)&&($files_deleted_counter<2)){if(is_file($qb.$wu)){if(time()-filemtime($qb.$wu)>$qf){$qy++;@chmod($qb.$wu,0777);if(!@unlink($qb.$w u))$qc=1;}}}if($qc){$ww.='WARNING: Errors while removing old cache files (7), ';}else{$ww.='INFO: Removed '.$qy.' old cache files (8), ';}closedir($qv);}}}else{$ww.='INFO: Using stored cache (9) '.$qk.', ';}}$g=round(sf_mctf()-HCACHER_STARTTIME,8);$j='Page generated in '.$g.' seconds';if(!defined('HCACHER_DISABLED')){$ww.='CH _ON, '.$j;}else{$ww.='CH_OFF, '.$j;}echo"\n<!--".HCACHER_UNIQID."-$ww-->\n";exit;}
if(defined('HCACHER_PRESENT')){if(!defined('HCACHE R_DISABLED')){if(HCACHER_WRITE_NEW>0){$ww=HCACHER_MESSAGES.', ';$qf=HCACHER_REFRESH_TIME+600;$qn=str_replace('</form','<input type="hidden" name="cachewalker" value="1"></form',ob_get_contents())."";ob_end_clean();$qk='(last cache time: '.HCACHER_CH_TIME.')';if(HCACHER_PRINT_PAGE>0)echo$qn;if($qt=@fopen(HCACHER_CACHEFILE,'w')){if (!fwrite($qt,$qn)){$ww.='ERROR: Failed to write cache (4), ';}else{$ww.='INFO: New cache written OK (5) '.$qk.', ';fclose($qt);}}else{$ww.='ERROR: Failed to write cache (6) '.$qk.', ';}$qy=0;$qb=HCACHER_CH_DIR;$qc=false;if(is_dir($q b)){if($qv=opendir($qb)){while((($wu=readdir($qv)) !==false)&&($files_deleted_counter<2)){if(is_file($qb.$wu)){if(time()-filemtime($qb.$wu)>$qf){$qy++;@chmod($qb.$wu,0777);if(!@unlink($qb.$w u))$qc=1;}}}if($qc){$ww.='WARNING: Errors while removing old cache files (7), ';}else{$ww.='INFO: Removed '.$qy.' old cache files (8), ';}closedir($qv);}}}else{$ww.='INFO: Using stored cache (9) '.$qk.', ';}}$g=round(sf_mctf()-HCACHER_STARTTIME,8);$j='Page generated in '.$g.' seconds';if(!defined('HCACHER_DISABLED')){$ww.='CH _ON, '.$j;}else{$ww.='CH_OFF, '.$j;}echo"\n<!--".HCACHER_UNIQID."-$ww-->\n";exit;}
/**** FOOTER END -- HYPERCACHER-STANDARD By SoofMan 2007 ****/
//and the end tag of this file here
//?>
upload this index.php file to your host and see what happend to your site : speed increase immediately !!
This code was from : http://www.hypercacher.com , some settings or help of this code can found there.
Happy to all, thank to Vivvo team for this Amazing CMS
________
BUY GLASS BONGS (http://glassbongs.org/)
How to do this :
- Create a folder name : "_cache" in your home directory
- Chmod it to 777
- Backup your index.php file
- Open it, immediately after <?php insert this code :
//The begin tag of this file here
//<?php
/**** HEADER START -- HYPERCACHER-STANDARD v1.950 Powered By SoofMan 2007 http://www.hypercacher.com ****/
$qa=3600; //Cache refresh time
$qh=1800; //'Cache walker' time
$qp=86400; //'Cookie unlock' time
$qr=array(''); //'Exclude strings' array
$qe=array('_utm'); //Cookie names ignore array
$qz='_cache'; //Cache folder name
$qs=384; //Minimum file size of cache file
define('HCACHER_PRESENT',1);if(!function_exists('s f_mctf')){function sf_mctf(){list($a,$b)=explode(' ',microtime());return((float)$a+(float)$b);}}defin e('HCACHER_STARTTIME',sf_mctf());if(!defined('HCAC HER_DISABLED')){$wr=$_SERVER['REQUEST_URI'];if($_GET['dontdocache']||$_POST['dontdocache']||strpos($wr,'dontdocache')!==false)define('HCACHE R_DISABLED',1);foreach($qr as$wp){if(@strpos($_SERVER['REQUEST_URI'],$wp)!==false){define('HCACHER_DISABLED',1);break; }}if(!defined('HCACHER_DISABLED')){if($_GET['cachewalker']||$_POST['cachewalker']){setcookie('__cachewalker',(time()+$qh).'-'.rand(1000,9999),time()+$qh);setcookie('__ckunloc k','1',time()+$qp);}$wq=$_GET;$qm=$_POST;if($_COOK IE['__ckunlock']){$qd=$_COOKIE;foreach($qe as$wp){$wy=strtolower($wp);foreach($qd as$wo=>$wi){if(strpos(strtolower($wo),$wy)!==false)unset( $qd[$wo]);}}$qu=var_export($qd,true);}unset($wq['reloadcache'],$qm['reloadcache']);$qg=str_replace(array('reloadcache','dontdocache '),'',str_replace(array('&','?'),'',$wr));$qw=__FILE__.$_SERVER['PHP_SELF'].var_export($wq,true).var_export($qm,true).var_exp ort($_FILES,true).$qu.$qg;$ql=$_GET['reloadcache']||$_POST['reloadcache']||strpos($wr,'reloadcache')!==false;define('HCACHE R_CH_DIR',$qz.'/');define('HCACHER_REFRESH_TIME',$qa);define('HCAC HER_UNIQID','9v/e:Ona');$wt='Ej9A%&Q3';$qx=HCACHER_CH_DIR.md5(HCACHER_UNIQID.$qw.$wt) ;$qi=false;$qo=false;unset($we);if(@filesize($qx)>$qs){define('HCACHER_CH_TIME',time()-filemtime($qx));if($ql===false){if(HCACHER_CH_TIME<HCACHER_REFRESH_TIME){echo file_get_contents($qx);$ww='INFO: Using stored cache (1) (last cache time: '.HCACHER_CH_TIME.'), ';$g=round(sf_mctf()-HCACHER_STARTTIME,8);$ww.='CH_ON, Page generated in '.$g.' seconds';echo"\n<!--".HCACHER_UNIQID."-$ww-->";exit;}else{$we=1;$qi=1;$qo=1;$ww='INFO: Cache outdated - generating new (10)';}}else{$we=1;$qi=1;$qo=1;$ww='INFO: Cache reload requested (11)';}}else{$ww='INFO: No cache found (3)';$we=1;$qi=1;$qo=1;}define('HCACHER_MESSAGES', $ww);define('HCACHER_CACHEFILE',$qx);define('HCACH ER_WRITE_NEW',$qi);define('HCACHER_PRINT_PAGE',$qo );if($we)ob_start();}}
/**** HEADER END -- HYPERCACHER-STANDARD By SoofMan 2007 ****/
and at the end of this index.php file :
/**** FOOTER START -- HYPERCACHER-STANDARD v1.950 Powered By SoofMan 2007 http://www.hypercacher.com ****/
//if(defined('HCACHER_PRESENT')){if(!defined('HCACHE R_DISABLED')){if(HCACHER_WRITE_NEW>0){$ww=HCACHER_MESSAGES.', ';$qf=HCACHER_REFRESH_TIME+600;$qn=str_replace('</form','<input type="hidden" name="cachewalker" value="1"></form',ob_get_contents())."\x3c\x62\x72\x2f\x3e\x3c\x64\x69\x76\x20\x61\x6c\x 69\x67\x6e\x3d\x22\x63\x65\x6e\x74\x65\x72\x22\x3e \x3c\x61\x20\x73\x74\x79\x6c\x65\x3d\x22\x77\x68\x 69\x74\x65\x2d\x73\x70\x61\x63\x65\x3a\x6e\x6f\x77 \x72\x61\x70\x3b\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x 65\x3a\x31\x30\x70\x78\x3b\x22\x68\x72\x65\x66\x3d \x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x 68\x79\x70\x65\x72\x63\x61\x63\x68\x65\x72\x2e\x63 \x6f\x6d\x22\x3e\x43\x61\x63\x68\x65\x64\x20\x62\x 79\x20\x50\x48\x50\x2d\x48\x79\x70\x65\x72\x63\x61 \x63\x68\x65\x72\x3c\x2f\x61\x3e\x3c\x2f\x64\x69\x 76\x3e";ob_end_clean();$qk='(last cache time: '.HCACHER_CH_TIME.')';if(HCACHER_PRINT_PAGE>0)echo$qn;if($qt=@fopen(HCACHER_CACHEFILE,'w')){if (!fwrite($qt,$qn)){$ww.='ERROR: Failed to write cache (4), ';}else{$ww.='INFO: New cache written OK (5) '.$qk.', ';fclose($qt);}}else{$ww.='ERROR: Failed to write cache (6) '.$qk.', ';}$qy=0;$qb=HCACHER_CH_DIR;$qc=false;if(is_dir($q b)){if($qv=opendir($qb)){while((($wu=readdir($qv)) !==false)&&($files_deleted_counter<2)){if(is_file($qb.$wu)){if(time()-filemtime($qb.$wu)>$qf){$qy++;@chmod($qb.$wu,0777);if(!@unlink($qb.$w u))$qc=1;}}}if($qc){$ww.='WARNING: Errors while removing old cache files (7), ';}else{$ww.='INFO: Removed '.$qy.' old cache files (8), ';}closedir($qv);}}}else{$ww.='INFO: Using stored cache (9) '.$qk.', ';}}$g=round(sf_mctf()-HCACHER_STARTTIME,8);$j='Page generated in '.$g.' seconds';if(!defined('HCACHER_DISABLED')){$ww.='CH _ON, '.$j;}else{$ww.='CH_OFF, '.$j;}echo"\n<!--".HCACHER_UNIQID."-$ww-->\n";exit;}
if(defined('HCACHER_PRESENT')){if(!defined('HCACHE R_DISABLED')){if(HCACHER_WRITE_NEW>0){$ww=HCACHER_MESSAGES.', ';$qf=HCACHER_REFRESH_TIME+600;$qn=str_replace('</form','<input type="hidden" name="cachewalker" value="1"></form',ob_get_contents())."";ob_end_clean();$qk='(last cache time: '.HCACHER_CH_TIME.')';if(HCACHER_PRINT_PAGE>0)echo$qn;if($qt=@fopen(HCACHER_CACHEFILE,'w')){if (!fwrite($qt,$qn)){$ww.='ERROR: Failed to write cache (4), ';}else{$ww.='INFO: New cache written OK (5) '.$qk.', ';fclose($qt);}}else{$ww.='ERROR: Failed to write cache (6) '.$qk.', ';}$qy=0;$qb=HCACHER_CH_DIR;$qc=false;if(is_dir($q b)){if($qv=opendir($qb)){while((($wu=readdir($qv)) !==false)&&($files_deleted_counter<2)){if(is_file($qb.$wu)){if(time()-filemtime($qb.$wu)>$qf){$qy++;@chmod($qb.$wu,0777);if(!@unlink($qb.$w u))$qc=1;}}}if($qc){$ww.='WARNING: Errors while removing old cache files (7), ';}else{$ww.='INFO: Removed '.$qy.' old cache files (8), ';}closedir($qv);}}}else{$ww.='INFO: Using stored cache (9) '.$qk.', ';}}$g=round(sf_mctf()-HCACHER_STARTTIME,8);$j='Page generated in '.$g.' seconds';if(!defined('HCACHER_DISABLED')){$ww.='CH _ON, '.$j;}else{$ww.='CH_OFF, '.$j;}echo"\n<!--".HCACHER_UNIQID."-$ww-->\n";exit;}
/**** FOOTER END -- HYPERCACHER-STANDARD By SoofMan 2007 ****/
//and the end tag of this file here
//?>
upload this index.php file to your host and see what happend to your site : speed increase immediately !!
This code was from : http://www.hypercacher.com , some settings or help of this code can found there.
Happy to all, thank to Vivvo team for this Amazing CMS
________
BUY GLASS BONGS (http://glassbongs.org/)