47 lines
1.3 KiB
PHP
47 lines
1.3 KiB
PHP
<?php
|
|
$file = 'counter.dat';
|
|
|
|
// 读取并自增
|
|
$counter = (int)@file_get_contents($file);
|
|
$counter++;
|
|
|
|
// 使用 LOCK_EX 防止并发写入冲突
|
|
file_put_contents($file, $counter, LOCK_EX);
|
|
?>
|
|
|
|
<?php
|
|
if($_GET["method"] == "mobile"){
|
|
if($_GET["lx"] == 'dongman'){
|
|
$imgurl = 'http://api.btstu.cn/sjbz/api.php?method=mobile&lx=dongman';
|
|
}
|
|
else if($_GET["lx"] == 'meizi'){
|
|
$imgurl = 'http://api.btstu.cn/sjbz/api.php?method=mobile&lx=meizi';
|
|
}
|
|
else if($_GET["lx"] == 'fengjing'){
|
|
$imgurl = 'http://api.btstu.cn/sjbz/api.php?method=mobile&lx=fengjing';
|
|
}
|
|
else if($_GET["lx"] == 'suiji'){
|
|
$imgurl = 'http://api.btstu.cn/sjbz/api.php?method=mobile&lx=suiji';
|
|
}
|
|
else{
|
|
$imgurl = 'http://api.btstu.cn/sjbz/api.php?method=mobile&lx=dongman';
|
|
}
|
|
}else{
|
|
if($_GET["lx"] == 'dongman'){
|
|
$imgurl = 'http://api.btstu.cn/sjbz/api.php?lx=dongman';
|
|
}
|
|
else if($_GET["lx"] == 'meizi'){
|
|
$imgurl = 'http://api.btstu.cn/sjbz/api.php?lx=meizi';
|
|
}
|
|
else if($_GET["lx"] == 'fengjing'){
|
|
$imgurl = 'http://api.btstu.cn/sjbz/api.php?lx=fengjing';
|
|
}
|
|
else if($_GET["lx"] == 'suiji'){
|
|
$imgurl = 'http://api.btstu.cn/sjbz/api.php?lx=suiji';
|
|
}
|
|
else{
|
|
$imgurl = 'http://api.btstu.cn/sjbz/api.php?lx=dongman';
|
|
}
|
|
}
|
|
header("Location:".$imgurl);//跳转输出图片
|
|
?>
|