先在服务器or主机上新建一个三角洲文件夹例:sjz(文件夹名字随便写),然后在sjz新建一个cache和index.php
在index.php中插入以下内容:
<?php
header('Content-Type: text/html; charset=utf-8');
$cacheDir = __DIR__ . '/cache';
$today = date('Ymd');
$cacheFile = $cacheDir . '/delta_' . $today . '.json';
if (!is_dir($cacheDir)) {
mkdir($cacheDir, 0755, true);
}
if (!is_dir($cacheDir)) {
mkdir($cacheDir, 0755, true);
}
/* ===== 清理 2 天前的缓存 ===== */
$files = glob($cacheDir . '/delta_*.json');
if ($files) {
$keepDays = [
date('Ymd'),
date('Ymd', strtotime('-1 day'))
];
foreach ($files as $file) {
if (preg_match('/delta_(\d{8})\.json$/', $file, $m)) {
if (!in_array($m[1], $keepDays, true)) {
@unlink($file);
}
}
}
}
// ✅ 今天已有缓存
if (file_exists($cacheFile)) {
$data = json_decode(file_get_contents($cacheFile), true);
goto render;
}
if (file_exists($cacheFile)) {
$data = json_decode(file_get_contents($cacheFile), true);
goto render;
}
$api = 'https://tmini.net/api/sjzmm?type=json&ckey=SJKHJDBBDGGE';
$ch = curl_init($api);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 8,
CURLOPT_SSL_VERIFYPEER => false,
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$apiData = json_decode($response, true);
if ($httpCode === 200 && isset($apiData['status']) && $apiData['status'] === 'success') {
$data = $apiData;
file_put_contents($cacheFile, json_encode($data, JSON_UNESCAPED_UNICODE));
} else {
$files = glob($cacheDir . '/delta_*.json');
if ($files) {
rsort($files);
$data = json_decode(file_get_contents($files[0]), true);
} else {
$data = null;
}
}
render:
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>三角洲行动 · 每日密码</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<style>
body {
background: #0c1017;
color: #cfd8dc;
font-family: Consolas, "JetBrains Mono", monospace;
margin: 0;
padding: 24px 16px;
}
h1 {
text-align: center;
font-size: 22px;
color: #82d9f5;
margin-bottom: 6px;
}
.update {
text-align: center;
font-size: 13px;
color: #7a8a99;
margin-bottom: 24px;
}
.grid {
max-width: 960px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 14px;
}
.card {
background: #141922;
border: 1px solid #2a313a;
border-left: 4px solid #3bb4d9;
padding: 14px 16px;
}
.map {
font-size: 15px;
color: #e0f7ff;
margin-bottom: 6px;
}
.pwd-row {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
}
.pwd {
background: #1c252f;
border: 1px solid #3bb4d9;
color: #3bb4d9;
padding: 6px 12px;
font-size: 18px;
letter-spacing: 6px;
}
.copy-btn {
background: none;
border: 1px solid #3bb4d9;
color: #3bb4d9;
font-size: 12px;
padding: 3px 8px;
cursor: pointer;
white-space: nowrap;
}
.copy-btn:hover {
background: #3bb4d9;
color: #0c1017;
}
.desc {
font-size: 13px;
color: #8fa3b0;
line-height: 1.6;
}
img {
width: 100%;
margin-top: 10px;
border: 1px solid #2a313a;
}
footer {
max-width: 960px;
margin: 40px auto 0;
text-align: center;
font-size: 12px;
color: #5a6a7a;
}
footer a {
color: #5a6a7a;
text-decoration: none;
}
</style>
<script>
function copyPwd(btn) {
var pwd = btn.getAttribute('data-pwd');
if (!pwd) return;
if (navigator.clipboard) {
navigator.clipboard.writeText(pwd);
} else {
var i = document.createElement('input');
i.value = pwd;
document.body.appendChild(i);
i.select();
document.execCommand('copy');
document.body.removeChild(i);
}
var t = btn.innerText;
btn.innerText = '已复制';
btn.style.opacity = '0.7';
setTimeout(function(){
btn.innerText = t;
btn.style.opacity = '1';
}, 1500);
}
</script>
</head>
<body>
<h1>🎯 三角洲行动 · 每日密码</h1>
<?php if (!empty($data) && $data['status'] === 'success'): ?>
<div class="update">
📅 <?=htmlspecialchars($data['data']['update_date'])?>
|共 <?=$data['data']['total_count']?> 个密码
</div>
<div class="grid">
<?php foreach ($data['data']['passwords'] as $p): ?>
<div class="card">
<div class="map"><?=htmlspecialchars($p['map_name'])?></div>
<div class="pwd-row">
<span class="pwd"><?=htmlspecialchars($p['password'])?></span>
<button class="copy-btn" data-pwd="<?=htmlspecialchars($p['password'], ENT_QUOTES)?>" onclick="copyPwd(this)">复制</button>
</div>
<div class="desc"><?=nl2br(htmlspecialchars($p['location_info']['description']))?></div>
<?php foreach ($p['location_info']['images'] as $img): ?>
<img src="<?=$img?>" loading="lazy">
<?php endforeach;?>
</div>
<?php endforeach;?>
</div>
<?php else: ?>
<p style="text-align:center;color:#ff6b6b;">❌ 数据加载失败,请稍后再试</p>
<?php endif; ?>
<footer style="
max-width: 960px;
margin: 60px auto 0;
padding: 18px 20px;
text-align: center;
font-family: Consolas, 'JetBrains Mono', monospace;
font-size: 12px;
color: #9ab8d6;
border-radius: 14px;
/* ✅ 毛玻璃核心 */
background: rgba(20, 28, 44, 0.55);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(59, 180, 217, 0.25);
line-height: 2;
">
<div style="
display: flex;
align-items: center;
justify-content: center;
gap: 14px;
flex-wrap: wrap;
">
<span style="color:#3bb4d9; font-weight:bold;">[ 216 工具页 ]</span>
<span>项目:三角洲行动 · 每日密码</span>
<span>
作者:
<a href="https://www.216bk.top/" target="_blank"
style="color:#9ab8d6; text-decoration:none;">
216
</a>
</span>
<span>数据:tmini.net</span>
<span>更新:<?=date('Y-m-d H:i')?></span>
</div>
</footer>
</body>
</html>
那么你就成功建好了
注意:你需要确保你当前sjz目录可写
示例网站:https://www.216bk.top/sjz