favicon.ico—-32×32
ground.txt—-落地页,支持多个
jump.php—-跳转代码,请设置默认访问文件
jump.php文件代码
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>明御安全检测中</title>
<link rel="icon" href="/favicon.ico">
<style>
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background-color: #f9f9f9;
}
#progress-container {
width: 60%;
max-width: 400px;
background-color: #ffffff;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 20px;
text-align: center;
margin-bottom: 20px;
}
#progress {
width: 100%;
background-color: #f3f3f3;
border-radius: 5px;
overflow: hidden;
margin-bottom: 15px;
}
.bar {
height: 15px;
background-color: #4caf50;
width: 100%;
transition: width 0.5s linear;
border-radius: 5px;
}
#countdown-message, #jump-message {
font-size: 18px;
color: #666666;
margin-bottom: 10px;
}
#jump-message {
display: none;
color: #4caf50;
}
#visitor-info {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
#visitor-info span {
margin-bottom: 10px;
}
#visitor-info span strong {
font-weight: bold;
}
</style>
</head>
<body>
<div id="progress-container">
<div id="progress">
<div class="bar"></div>
</div>
<div id="status-message">明御安全检测中</div>
</div>
<div id="visitor-info">
<span>IP: <strong><?php echo htmlspecialchars($_SERVER['REMOTE_ADDR']); ?></strong></span>
<span>UA: <strong><?php echo htmlspecialchars($_SERVER['HTTP_USER_AGENT']); ?></strong></span>
<span id="device-type"></span>
</div>
<?php
function getRandomUrlFromFile($filename) {
$file = file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
if ($file !== false && count($file) > 0) {
$randomLine = $file[array_rand($file)];
return trim($randomLine);
}
return '';
}
$randomUrl = getRandomUrlFromFile("ground.txt");
?>
<script>
var progressBar = document.querySelector('.bar');
var statusMessage = document.querySelector('#status-message');
var titleElement = document.querySelector('title');
var countdown = 3;
var randomUrl = '<?php echo $randomUrl; ?>';
var interval = setInterval(function() {
countdown--;
progressBar.style.width = ((3 - countdown) / 3) * 100 + '%';
if (countdown === 2) {
statusMessage.textContent = '明御检测成功';
titleElement.textContent = '明御检测成功';
} else if (countdown === 1) {
statusMessage.textContent = '连接中...';
titleElement.textContent = '连接中...';
} else if (countdown === 0) {
clearInterval(interval);
statusMessage.textContent = '连接成功-即将跳转';
titleElement.textContent = '连接成功-即将跳转';
setTimeout(function() {
window.location.href = randomUrl;
}, 1000);
} else {
statusMessage.textContent = '明御安全检测中';
}
}, 1000);
document.addEventListener('DOMContentLoaded', function() {
var deviceTypeElement = document.getElementById('device-type');
var userAgent = navigator.userAgent;
var deviceDetails = '';
var mobileRegex = /Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Opera Mini/i;
var tabletRegex = /(tablet|ipad|playbook|silk)|(android(?!.*mobile))/i;
var windowsRegex = /Windows( NT| Phone| ARM)/i;
var macosRegex = /Macintosh|Mac OS X/i;
var linuxRegex = /Linux|X11/i;
var chromeosRegex = /CrOS/i;
var firefoxosRegex = /Firefox/i;
var ubuntutouchRegex = /Ubuntu/i && /Mobile/i;
var tizenRegex = /Tizen/i;
var sailfishosRegex = /Sailfish/i;
var webosRegex = /webOS/i;
var blackberryRegex = /BB10/i;
var symbianRegex = /Symbian/i;
var isMobile = mobileRegex.test(userAgent);
var isTablet = tabletRegex.test(userAgent);
var isDesktop = !isMobile && !isTablet;
if (isMobile && !isTablet) {
if (/iPhone|iPod/i.test(userAgent)) {
deviceDetails = 'iPhone';
} else if (/Android/i.test(userAgent)) {
deviceDetails = 'Android Phone';
} else if (windowsRegex.test(userAgent) && /Phone/i.test(userAgent)) {
deviceDetails = 'Windows Phone';
} else {
deviceDetails = 'Other Mobile';
}
} else if (isTablet) {
if (/iPad/i.test(userAgent)) {
deviceDetails = 'iPad';
} else if (/Android/i.test(userAgent)) {
deviceDetails = 'Android Tablet';
} else if (windowsRegex.test(userAgent) && /Touch/i.test(userAgent)) {
deviceDetails = 'Windows Tablet';
} else {
deviceDetails = 'Other Tablet';
}
} else {
if (windowsRegex.test(userAgent)) {
deviceDetails = 'Windows Desktop';
} else if (macosRegex.test(userAgent)) {
var macosVersionMatch = /Mac OS X (\d+)_(\d+)_(\d+)/.exec(userAgent);
if (macosVersionMatch) {
deviceDetails = 'MacOS Desktop ' + macosVersionMatch[1] + '.' + macosVersionMatch[2] + '.' + macosVersionMatch[3];
} else {
deviceDetails = 'MacOS Desktop';
}
} else if (linuxRegex.test(userAgent)) {
deviceDetails = 'Linux Desktop';
} else if (chromeosRegex.test(userAgent)) {
deviceDetails = 'ChromeOS Desktop';
} else if (firefoxosRegex.test(userAgent)) {
deviceDetails = 'Firefox OS Device';
} else if (ubuntutouchRegex.test(userAgent)) {
deviceDetails = 'Ubuntu Touch Device';
} else if (tizenRegex.test(userAgent)) {
deviceDetails = 'Tizen Device';
} else if (sailfishosRegex.test(userAgent)) {
deviceDetails = 'Sailfish OS Device';
} else if (webosRegex.test(userAgent)) {
deviceDetails = 'webOS Device';
} else if (blackberryRegex.test(userAgent)) {
deviceDetails = 'BlackBerry 10+ Device';
} else if (symbianRegex.test(userAgent)) {
deviceDetails = 'Symbian Device';
} else {
deviceDetails = 'Other Desktop or Unknown Device';
}
}
deviceTypeElement.textContent = 'Device: ' + deviceDetails;
});
</script>
</body>
</html>
目前是随机落地页跳转,可以自己指定访客端设备进行跳转。
发表回复