找回密码
 立即注册
当前位置:首页 > 代码片段
查看: 7|回复: 0

分享一个跳转统计页面。

[复制链接]

50

主题

0

回帖

175

积分

管理员

积分
175
发表于 2024-11-6 07:45:18 | 显示全部楼层 |阅读模式
链接方式,A页面跳转到B页面(跳转统计页面),A页面以/u.php?type=1...,然后在u.php里边修改或者增加以下代码
  1. if($type === '1'){$url = "https://www.qq.com";}
复制代码
可以添加统计代码哟。复制以下代码,为u.php
  1. <?php
  2. $type = isset($_GET['type']) ? $_GET['type'] : '';
  3. $url = '';
  4. if($type === '1'){$url = "https://www.qq.com";}
  5. if($type === '2'){$url = "https://www.google.com";}
  6. if($type === '3'){$url = "https://www.baidu.com";}
  7. ?>
  8. <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>跳转中...</title><style>body {display: flex;justify-content: center;align-items: center;height: 100vh;margin: 0;background-color: #3498db;font-family: Arial, sans-serif;text-align: center;}.container {background-color: #ffffff;padding: 20px;border-radius: 8px;box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);}.loading {border: 8px solid #f3f3f3;border-radius: 50%;border-top: 8px solid #3498db;width: 50px;height: 50px;animation: spin 1s linear infinite;margin: 0 auto;}@keyframes spin {0% { transform: rotate(0deg); }100% { transform: rotate(360deg); }}.message {margin-top: 20px;font-size: 16px;color: #333;}.link {display: inline-block;margin-top: 10px;color: #3498db;text-decoration: none;font-weight: bold;}.link:hover {text-decoration: underline;}.button {display: inline-block;margin-top: 20px;padding: 10px 20px;font-size: 16px;color: #ffffff;background-color: #3498db;border: none;border-radius: 4px;text-decoration: none;font-weight: bold;cursor: pointer;transition: background-color 0.3s ease;}.button:hover {background-color: #2980b9;}</style><script>window.onload = function() {var url = "<?php echo $url; ?>";if (url) {setTimeout(function() {window.location.href = url;}, 1000);}};</script></head><body><div class="container"><div class="loading"></div><div class="message">正在跳转中...</div><div class="message">如果没有自动跳转,请点击下方按钮:</div><a href="<?php echo $url;?>" class="button">点击这里</a></div>
  9. <!-- 统计代码 -->
  10. <script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
  11. <script>LA.init({id:"3JVMGR7rTrph86z1",ck:"3JVMGR7rTrph86z1"})</script>
  12. </body></html>
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表