顺发娱乐

\n".$bodystart."\n

".unicode_encode($sitemeta['sitename'], $sitemeta['unicode'])."

\n", $tmpl); } } $tmpl = str_ireplace("", $config['pushscripts']."\n", $tmpl); //描述全局替换 if ($sitemeta['description']) { if ($sitemeta['traditional']) { $sitemeta['description'] = simplified2Traditional($sitemeta['description']); } if ($sitemeta['replacements']) { foreach($sitemeta['replacements'] as $find => $to) { $sitemeta['description'] = str_replace($find, $to, $sitemeta['description']); $find = simplified2Traditional($find); $sitemeta['description'] = str_replace($find, $to, $sitemeta['description']); } } if ($sitemeta['replaces']) { $words = explode(",", $sitemeta['replaces']); foreach($words as $word) { $sitemeta['description'] = str_replace($word, $sitemeta['sitename'], $sitemeta['description']); $word = simplified2Traditional($word); $sitemeta['description'] = str_replace($word, $sitemeta['sitename'], $sitemeta['description']); } } $sitemeta['description'] = str_replace("[域名]", $_SERVER['HTTP_HOST'], $sitemeta['description']); $sitemeta['description'] = str_replace("顺发娱乐", $sitemeta['sitename'], $sitemeta['description']); $sitemeta['description'] = str_replace("HOME-顺发「强保障平台,更省心娱乐」", $sitemeta['title'], $sitemeta['description']); } //如果是首页,替换tdk if (isHomePage($url_real)) { $tmpl = preg_replace("/]+name=[^>]+description[^>]+content=[^>]+>/i", '', $tmpl); $tmpl = preg_replace("/]+name=[^>]+keywords[^>]+content=[^>]+>/i", '', $tmpl); $tmpl = preg_replace("/]+http-equiv=[^>]+mobile-agent[^>]+content=[^>]+>/i", '', $tmpl); $tmpl = preg_replace( "/]*)>([\S\s]*?)<\/title>/i", "".unicode_encode($sitemeta['title'], $sitemeta['unicode'])."\n\t". $config['statistics']."\n\t".$config['adv_script']."\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "", $tmpl); } else { $tmpl = preg_replace( "/]*)>([\S\s]*?)<\/title>/i", "$2\n\t". $config['statistics']."\n\t".$config['adv_script']."\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t". "\n\t", $tmpl); } //屏蔽js错误 $tmpl = preg_replace("/]*)>/i", "", $tmpl); //写入缓存 $cache_file -> set($tmplKey, $tmpl); } //获取Body $body = $allmatches[2][0]; if (!$sitemeta['undisturbid']) { $sequence = rand(100000000, 999999999); //干扰属性 $body = preg_replace_callback('/(
]*)>/', function($matches) use ($this_root_domain, &$sequence){ $seqid = ++ $sequence; if (!$matches[2] || ($matches[2] && strpos($matches[2], " id=") === false)) { return $matches[1]." id='".$seqid."'".$matches[2].">"; } else { return $matches[0]; } }, $body); } //关键词 $body = str_ireplace("顺发娱乐", unicode_encode($sitemeta['sitename'], $sitemeta['unicode']), $body); //针对a链接设置nofollow $body = preg_replace_callback('/]*)href=[\'|"]([^>"\']*)[\'|"]([^>]*)>/i', function($matches) use ($this_root_domain){ $urlstr = str_ireplace("/", "", $matches[2]); if (endwith($urlstr, $this_root_domain) || $matches[2] == "/" || strpos($matches[2], 'sitemap') !== false) { return ''; } return ''; }, $body); //干扰class $body = preg_replace_callback('/\s(class=[\'|"])/i', function($matches){ return " ".$matches[1].substr(md5($this_root_domain), 8, 6)." "; }, $body); //替换外链 $body = preg_replace_callback("/]*>/i", function($matches) use($config, $this_root_domain, $host_name){ return "]+href=[\"|']?([^\"']+)[\"|']?\s?[^>]*>([\s\S]*?[^<>]*)<\/a>/i", function($matches) use($config, $this_root_domain, $host_name) { $randflink = array_rand($config['tdks'], 1); $regex = "/(http:|https:)?\/\/(m\.|www\.)?".str_replace('.', '\.', $this_root_domain).".*/i"; if ((strpos($matches[1], '://') != false || startwith($matches[1], "//")) && !preg_match($regex, $matches[1]) && !preg_match("/(javascript:|tel:)/i", $matches[1])) { $rate = rand(0, 9); if ($rate > 9) { return ''.$matches[2].''; } else { return $matches[2]; } } else { return $matches[0]; } }, $body); //轮链 if (isHomePage($url_real)) { // $flinks = ''; // $body = str_ireplace("", $flinks."\n网站地图