初始化
This commit is contained in:
1
api/qqimg/counter.dat
Normal file
1
api/qqimg/counter.dat
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
23
api/qqimg/index.php
Normal file
23
api/qqimg/index.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
$counter = intval(file_get_contents("counter.dat"));
|
||||
$_SESSION['#'] = true;
|
||||
$counter++;
|
||||
$fp = fopen("counter.dat","w");
|
||||
fwrite($fp, $counter);
|
||||
fclose($fp);
|
||||
?>
|
||||
|
||||
<?php
|
||||
error_reporting(E_ALL & ~E_NOTICE);
|
||||
header('Content-Type: text/plain');
|
||||
|
||||
$qq = $_GET['qq'] ?? '';
|
||||
|
||||
if (is_numeric($qq) && $qq !== '') {
|
||||
header('Cache-Control: public, max-age=86400');
|
||||
header('Location: https://q1.qlogo.cn/g?b=qq&nk='.$qq.'&s=100');
|
||||
} else {
|
||||
http_response_code(400);
|
||||
echo '缺少有效的QQ号码参数';
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user