美化简介
上传子比主题目录下覆盖go.php文件即可,注意!原来的go.php一定要备份!备份!备份!!!,下面是效果图片
美化效果
![图片[1]-子比主题美化 – 动态粒子背景GO跳转页面美化源码-子比主题美化教程社区-推荐-安忆小屋](https://oss.xkzhi.cn/2025/10/23/tywbi8.gif)
美化教程
<?php
if (
strlen($_SERVER['REQUEST_URI']) > 384 ||
strpos($_SERVER['REQUEST_URI'], "eval(") !== false ||
strpos($_SERVER['REQUEST_URI'], "base64") !== false
) {
@header("HTTP/1.1 414 Request-URI Too Long");
@header("Status: 414 Request-URI Too Long");
@header("Connection: Close");
@exit;
}
@session_start();
$target_url = '';
if (!empty($_SESSION['GOLINK'])) {
$target_url = $_SESSION['GOLINK'];
unset($_SESSION['GOLINK']);
} else {
$query_string = $_SERVER["QUERY_STRING"];
if (preg_match('/^url=(.*)$/i', $query_string, $matches)) {
$target_url = $matches[1];
}
}
if (!empty($target_url)) {
if ($target_url === base64_encode(base64_decode($target_url, true))) {
$target_url = base64_decode($target_url);
}
$target_url = htmlspecialchars($target_url);
preg_match('/^(http|https|thunder|qqdl|ed2k|Flashget|qbrowser):\/\//i', $target_url, $protocol_matches);
if ($protocol_matches) {
$url = $target_url;
} else {
preg_match('/\./i', $target_url, $domain_matches);
if ($domain_matches) {
$url = 'http://' . $target_url;
} else {
$url = 'http://' . $_SERVER['HTTP_HOST'];
}
}
} else {
$url = 'http://' . $_SERVER['HTTP_HOST'];
}
$url = str_replace('&', '&', $url);
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>星空知 - 广告页面自动跳转提示 | 3秒安全跳转</title>
<meta name="keywords" content="星空知,广告页面跳转提示,自动跳转页面,安全跳转链接,赞助商广告入口">
<meta name="description" content="星空知广告页面跳转提示页:您将在3秒后自动进入赞助商广告页面,也可点击按钮直接访问。网络交易有风险,遇欺诈广告可联系 星空知 投诉,保障安全访问。">
<!-- 基础优化 -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="index,follow">
<meta name="author" content="星空知">
<meta name="theme-color" content="#165DFF">
<style>
*{margin:0;padding:0;box-sizing:border-box;font-family:Inter,system-ui,-apple-system,sans-serif}body{background-color:#f5f7fa;min-height:100vh;overflow:hidden;display:flex;align-items:center;justify-content:center;padding:1rem}.container{position:relative;z-index:10;width:100%;max-width:420px}.card{background:rgba(255,255,255,.9);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:1rem;box-shadow:0 4px 20px rgba(0,0,0,.1);padding:2rem;text-align:center}.icon-rocket{width:4rem;height:4rem;margin:0 auto 1rem;background:linear-gradient(135deg,#165dff,#7b61ff);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.5rem;box-shadow:0 4px 12px rgba(22,93,255,.3)}.title{font-size:clamp(1.5rem,4vw,2rem);font-weight:700;margin-bottom:.5rem;background:linear-gradient(135deg,#165dff,#7b61ff);-webkit-background-clip:text;background-clip:text;color:transparent}.subtitle{color:#6b7280;margin-bottom:2rem}.countdown-text{font-size:clamp(1.2rem,3vw,1.5rem);font-weight:600;color:#1d2129;margin-bottom:1rem}.countdown-number{font-size:clamp(1.5rem,4vw,2rem);font-weight:700;color:#165dff;display:inline-block;transition:transform .3s ease}.progress-container{width:100%;height:1rem;background-color:#e5e7eb;border-radius:.5rem;overflow:hidden;margin-bottom:2rem}.progress-bar{height:100%;background:linear-gradient(90deg,#165dff,#7b61ff);animation:countdown 3s linear forwards}.warning-box{background-color:rgba(255,125,0,.1);border:1px solid rgba(255,125,0,.3);border-radius:.5rem;padding:1rem;margin-bottom:2rem;text-align:left;display:flex}.warning-icon{color:#ff7d00;margin-right:.5rem;margin-top:.25rem}.warning-text{color:#4b5563;font-size:.9rem}.warning-link{color:#165dff;text-decoration:underline;cursor:pointer}.btn{display:inline-flex;align-items:center;justify-content:center;padding:.8rem 2rem;background:linear-gradient(90deg,#165dff,#7b61ff);color:#fff;border-radius:9999px;font-weight:600;text-decoration:none;box-shadow:0 4px 12px rgba(22,93,255,.3);transition:all .3s ease;position:relative;overflow:hidden}.btn:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(22,93,255,.4)}.btn::before{content:'';position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);transition:left .6s ease}.btn:hover::before{left:100%}.btn-icon{margin-left:.5rem}.footer{margin-top:2rem;color:#6b7280;font-size:.85rem}#particles{position:absolute;top:0;left:0;width:100%;height:100%;z-index:0;background-color:transparent}@keyframes countdown{0%{width:100%}100%{width:0%}}@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(1.05)}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes slideUp{0%{transform:translateY(20px);opacity:0}100%{transform:translateY(0);opacity:1}}.animate-fadeIn{animation:fadeIn .8s ease-in forwards}.animate-slideUp{animation:slideUp .8s ease-out forwards}.animate-pulse{animation:pulse 2s infinite}.scale-125{transform:scale(1.25)}@supports not (backdrop-filter:blur(1px)){.card{background:rgba(255,255,255,.95)}}
</style>
</head>
<body>
<canvas id="particles"></canvas>
<div class="container">
<div class="card animate-fadeIn">
<div class="animate-slideUp" style="animation-delay: 0.2s;">
<div class="icon-rocket animate-pulse">
▶
</div>
<h1 class="title">星空知</h1>
<p class="subtitle">连接科技,共创未来</p>
</div>
<div class="animate-slideUp" style="animation-delay: 0.4s;">
<p class="countdown-text">
您将在
<span id="countdown" class="countdown-number">3</span>
秒后进入赞助商广告页面
</p>
<div class="progress-container">
<div class="progress-bar"></div>
</div>
</div>
<div class="warning-box animate-slideUp" style="animation-delay: 0.6s;">
<div class="warning-icon">⚠️</div>
<p class="warning-text">
网络有风险,交易需谨慎!如遇欺诈广告请联系:
<a href="https://www.xkzhi.com/kefu" class="warning-link">星空知</a> 投诉。
</p>
</div>
<div class="animate-slideUp" style="animation-delay: 0.8s;">
<a href="<?php echo $url; ?>" rel="external nofollow" id="skipBtn" class="btn" rel="nofollow noopener" target="_blank">
<span>无需等待,点击进入</span>
<span class="btn-icon">→</span>
</a>
</div>
<div class="footer animate-slideUp" style="animation-delay: 1s;">
<p>© 2025 星空知. 保留所有权利。</p>
<p class="mt-1"><a href="https://www.xkzhi.com/" class="text-primary hover:underline" rel="canonical">访问星空知官网</a></p>
</div>
</div>
</div>
<script>
(function() {
const canvas = document.getElementById('particles');
const ctx = canvas.getContext('2d');
let particles = [];
function resizeCanvas() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
resizeCanvas();
window.addEventListener('resize', resizeCanvas);
class Particle {
constructor() {
this.x = Math.random() * canvas.width;
this.y = Math.random() * canvas.height;
this.size = Math.random() * 3 + 1;
this.speedX = Math.random() * 2 - 1;
this.speedY = Math.random() * 2 - 1;
this.color = '#165DFF';
this.opacity = Math.random() * 0.5 + 0.2;
}
update() {
this.x += this.speedX;
this.y += this.speedY;
if (this.x < 0 || this.x > canvas.width) this.speedX *= -1;
if (this.y < 0 || this.y > canvas.height) this.speedY *= -1;
}
draw() {
ctx.beginPath();
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
ctx.fillStyle = `${this.color.slice(0, 7)}${Math.floor(this.opacity * 255).toString(16)}`;
ctx.fill();
}
}
function connectParticles() {
for (let a = 0; a < particles.length; a++) {
for (let b = a; b < particles.length; b++) {
const dx = particles[a].x - particles[b].x;
const dy = particles[a].y - particles[b].y;
const distance = Math.sqrt(dx * dx + dy * dy);
if (distance < 150) {
ctx.beginPath();
ctx.strokeStyle = `${particles[a].color.slice(0, 7)}${Math.floor((0.2 - distance/750) * 255).toString(16)}`;
ctx.lineWidth = 0.5;
ctx.moveTo(particles[a].x, particles[a].y);
ctx.lineTo(particles[b].x, particles[b].y);
ctx.stroke();
}
}
}
}
function initParticles() {
particles = [];
for (let i = 0; i < 80; i++) {
particles.push(new Particle());
}
}
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
for (let i = 0; i < particles.length; i++) {
particles[i].update();
particles[i].draw();
}
connectParticles();
requestAnimationFrame(animate);
}
initParticles();
animate();
})();
(function() {
let seconds = 3;
const countdownEl = document.getElementById('countdown');
const skipBtn = document.getElementById('skipBtn');
const targetUrl = "<?php echo addslashes($url); ?>";
const countdownInterval = setInterval(() => {
seconds--;
countdownEl.textContent = seconds;
countdownEl.classList.add('scale-125');
setTimeout(() => countdownEl.classList.remove('scale-125'), 300);
if (seconds <= 0) {
clearInterval(countdownInterval);
setTimeout(() => window.location.href = targetUrl, 300);
}
}, 1000);
window.addEventListener('beforeunload', () => clearInterval(countdownInterval));
})();
</script>
</body>
</html>

没有回复内容