|
链接方式,A页面跳转到B页面(跳转统计页面),A页面以/u.php?type=1...,然后在u.php里边修改或者增加以下代码
- if($type === '1'){$url = "https://www.qq.com";}
复制代码 可以添加统计代码哟。复制以下代码,为u.php
- <?php
- $type = isset($_GET['type']) ? $_GET['type'] : '';
- $url = '';
- if($type === '1'){$url = "https://www.qq.com";}
- if($type === '2'){$url = "https://www.google.com";}
- if($type === '3'){$url = "https://www.baidu.com";}
- ?>
- <!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>
- <!-- 统计代码 -->
- <script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
- <script>LA.init({id:"3JVMGR7rTrph86z1",ck:"3JVMGR7rTrph86z1"})</script>
- </body></html>
复制代码
|
|