📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
cicekciscripti.demodesign.com.tr
/
dione
📝
CACHE.php
← Geri Dön
<?php $siteURL = url(); //sitenin ana urlsi $cdnURL = ""; //cdn uygulanacak url cdn yoksa boş bırak $gzip = 'acik'; // açık ise acik yazın kapalı ise kapali $cdnDir = 'fonts,wp-content,wp-includes'; //dokunmayın $noChange = '.php'; //dokunmayın $noChangeArr = array_map('trim', explode(',', $noChange)); //dokunmayın if ( !is_array( $noChangeArr ) ) //dokunmayın $noChangeArr = array(); //dokunmayın $cdnCname = ''; //dokunmayın $cdnHttp = ''; //dokunmayın $cdnCnames = array_map('trim', explode(',', $cdnCname)); //dokunmayın if ($cdnCnames[0] == '') $cdnCnames = array(); //dokunmayın /* Bundan aşağısına hiç dokunmayın */ function fonk1($match, $excludes) { foreach ($excludes as $badword) { if (stristr($match, $badword) != false) { return true; } } return false; } function fonk2($s, $mod) { $n = hexdec(substr(sha1($s), 0, 5)); return $n % $mod; } function fonk3($match) { global $siteURL, $cdnURL, $noChangeArr, $cdnCnames, $cdnHttp; if ( $cdnURL == '' ) return $match[0]; if ( $cdnHttp && substr( $match[0], 0, 5 ) == 'https' ) return $match[0]; if ( false == in_array( $cdnURL, $cdnCnames ) ) $cdnCnames[] = $cdnURL; if ( fonk1( $match[0], $noChangeArr ) ) { return $match[0]; } else { $include_dirs = fonk4(); if ( preg_match( '/' . $include_dirs . '/', $match[0] ) ) { $offset = fonk2($match[1], count($cdnCnames)); return str_replace($siteURL, $cdnCnames[$offset], $match[0]); } else { return $match[0]; } } } function fonk4() { global $cdnDir; $input = explode(',', $cdnDir); if ($cdnDir == '' || count($input) < 1) { return 'wp\-content|wp\-includes'; } else { return implode('|', array_map('quotemeta', array_map('trim', $input))); } } function fonkFinal($content) { global $siteURL, $cdnURL; if ($siteURL == $cdnURL) { return $content; } else { $dirs = fonk4(); $regex = '#(?<=[(\"\'])'.quotemeta($siteURL).'/(?:((?:'.$dirs.')[^\"\')]+)|([^/\"\']+\.[^/\"\')]+))(?=[\"\')])#'; return preg_replace_callback($regex, 'fonk3', $content); } } $ftp_cache = 20000000000000000; // dakika cinsinden function cache_baslat(){ global $ftp_cache; global $gzip; $feed = "750978a6610fa2b4f8e13fb3a731f1b6.cache"; $feed2 = "3939cc98e0509597fb279407e70cd9b2.cache"; $filename = md5($_SERVER['REQUEST_URI']).'.cache'; $cachesi = true; if($filename != $feed OR $filename != $feed2 ){ $cachefile = 'CACHE_LIST/'.$filename; define('_CACHEOLUSTUR', $cachefile); $zaman = 200 * $ftp_cache; $cachetime = $zaman; if (file_exists($cachefile)){ if(time() - $cachetime < filemtime($cachefile)){ if($gzip == 'acik'){ echo fonkFinal(str_replace(array("\n","\r","\t"),array("","",""),file_get_contents($cachefile))); }else{ echo fonkFinal(file_get_contents($cachefile)); } exit; }else{ unlink($cachefile); } } ob_start(); } } function cache_bitir(){ $fp = fopen(_CACHEOLUSTUR, 'w+'); fwrite($fp, ob_get_contents()); fclose($fp); ob_end_flush(); } ?>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula