<?php
$start_time = time();
$user_ip = $_SERVER['REMOTE_ADDR'];
require_once "config.php";
if (!$conn) {
die("连接数据库失败:" . mysqli_connect_error());
}
register_shutdown_function(function() use ($conn, $user_ip, $start_time) {
$stay_time = time() - $start_time;
$sql = "INSERT INTO user_stay_time (user_ip, stay_time, create_time) VALUES ('$user_ip', $stay_time, NOW())";
if (mysqli_query($conn, $sql)) {
} else {
echo "数据写入失败:" . mysqli_error($conn);
}
mysqli_close($conn);
});
?>
<!DOCTYPE HTML>
<html style="padding-bottom: 60px;">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>快手号权重查询账号估价</title>
<link rel="stylesheet" href="index.css">
<style>
body::before {
content: "小K网";
opacity: 0.3;
font-size: 4em;
color: #ccc;
position: fixed;
top: 60%;
left: 50%;
transform: translate(-50%, -50%) rotate(-35deg);
z-index: -1;
}
.newtons-cradle {
--uib-size: 50px;
--uib-speed: 1.2s;
--uib-color: #474554;
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: var(--uib-size);
height: var(--uib-size);
}
.newtons-cradle__dot {
position: relative;
display: flex;
align-items: center;
height: 100%;
width: 25%;
transform-origin: center top;
}
.newtons-cradle__dot::after {
content: '';
display: block;
width: 100%;
height: 25%;
border-radius: 50%;
background-color: var(--uib-color);
}
.newtons-cradle__dot:first-child {
animation: swing var(--uib-speed) linear infinite;
}
.newtons-cradle__dot:last-child {
animation: swing2 var(--uib-speed) linear infinite;
}
@keyframes swing {
0% {
transform: rotate(0deg);
animation-timing-function: ease-out;
}
25% {
transform: rotate(70deg);
animation-timing-function: ease-in;
}
50% {
transform: rotate(0deg);
animation-timing-function: linear;
}
}
@keyframes swing2 {
0% {
transform: rotate(0deg);
animation-timing-function: linear;
}
50% {
transform: rotate(0deg);
animation-timing-function: ease-out;
}
75% {
transform: rotate(-70deg);
animation-timing-function: ease-in;
}
}
</style>
</head>
<body>
<div class="qz-top">
<div class="header-wrapper">
<div class="header-left"><img src="images/logo.png" /></div>
<div class="header-middle"></div>
<div class="header-right">
<div class="header-right-but"></div>
<div class="header-right-button">
<a href="https://xkwo.com/" style="font-size: 13px;" target="_blank">首页</a>
</div>
</div>
</div>
</div>
<div class="container">
<form>
<div class="input">
<input type="text" placeholder="请粘贴快手id" value="" autocomplete="off" id="input-link">
</div>
</form>
<button onclick="checkWeight()" ><div class="search" ><span>查权重</span></div></button>
</div>
<script>
function checkWeight() {
var maxAttempts = 3; // 一天最多提交3次
var today = new Date();
today.setHours(0, 0, 0, 0);
var expires = new Date(today.getTime() + (24 * 60 * 60 * 1000));
var attempts = getCookie("attempts"); // 获取之前的提交次数
if (attempts === null) {
attempts = 0;
}
if (attempts >= maxAttempts) {
alert("您今天已经查询了" + maxAttempts + "次,请明天再来。by--小陈");
return;
}
var url = document.getElementById("input-link").value.trim();
var newUrl = "https://api.phym.cloud/free/xk/ksqz1.1/api.php?id=" + url;
location.href = newUrl;
setCookie("attempts", ++attempts, expires); // 提交成功后,更新Cookie中的提交次数
}
function getCookie(name) {
var pattern = new RegExp("(?:(?:^|.*;)\\s*" + name + "\\s*\\=\\s*([^;]*).*$)|^.*$");
return decodeURIComponent(document.cookie.replace(pattern, "$1")) || null;
}
function setCookie(name, value, expires) {
document.cookie = name + "=" + encodeURIComponent(value) + "; expires=" + expires.toUTCString() + "; path=/";
}
</script>
<footer>
<div class="footer-wrapper">
<div class="footer-size">
<span>独立源码部署或开通代理请联系下方QQ</span></br>
<span>如对数据有疑问或不希望收录请联系我们,qq</span></br>
<span>Copyright © 2020-2023 </span><a href="" target="_blank">小陈</a>
</div>
</div>
</footer>
<script>
function btn1(){
document.getElementById('div1').style.display='block';
}
function btn2(){
document.getElementById('div1').style.display='none';
document.getElementById('div2').style.display='block';
}
</script>
</body>
</html>