Comments (4)
没接触过html和php,这两天摸索着做的,大家想用的话自取!
创建index.php,放入代码即可
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>超星自动签到状态</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/mdui.min.css" />
</head>
<body>
<?php
$data = file_get_contents('http://localhost:5743/status');
$arr = json_decode($data,true);
$status = $arr['cxAutoSignEnabled'];
if ($status==1) {
$status = "正在运行";
} else {
$status = "停止运行";
}
echo <<<END
<div class="mdui-container">
<div class="mdui-panel" mdui-panel >
<div class="mdui-panel-item">
<div class="mdui-panel-item-header">
<div class="mdui-panel-item-title">帅哥</div>
<div class="mdui-panel-item-summary">运行状态:$status</div>
<i class="mdui-panel-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
</div>
<div class="mdui-panel-item-body">
<div class="mdui-panel-item-actions">
<form method="post">
<button class="mdui-btn mdui-ripple" type="submit" name="button1">开启</button>
<button class="mdui-btn mdui-ripple" type="submit" name="button2">关闭</button>
</form>
</div>
</div>
</div>
</div>
</div>
END;
if(isset($_POST['button1'])) {
fopen("http://localhost:5743/status/enable","r");
header('location: '.$_SERVER['HTTP_REFERER']);
}
if(isset($_POST['button2'])) {
fopen("http://localhost:5743/status/disable","r");
header('location: '.$_SERVER['HTTP_REFERER']);
}
?>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/mdui.min.js"></script>
</body>
</html>
from cx-auto-sign.
搞起来搞起来
from cx-auto-sign.
C# WEB 不会搞,用 Go 重写了一个,BUG 多多:https://github.com/moeshin/cx-im
from cx-auto-sign.
C# WEB 不会搞,用 Go 重写了一个,BUG 多多:https://github.com/moeshin/cx-im
搞复杂了啊,这个的输出信息改一下就行了,不用写网页
from cx-auto-sign.
Related Issues (20)
- 多个课程中,部分课程签到失败 HOT 18
- 在使用start.sh的时候出现两个进程,疑似BUG HOT 6
- 上传图片失败 HOT 9
- 开启多个用户签到时,个别账号在挂几天后会掉。 HOT 2
- 位置签到不在指定范围内时,会导致CPU使用率快速提升。
- 这咋解决 HOT 1
- powershell运行时报错 HOT 1
- 支持Telegram bot推送 HOT 1
- 请问怎么设置多账号自动侦测签到活动呢? HOT 3
- 支持更多推送渠道 HOT 4
- 签到接口失效 HOT 4
- 登陆账号时报错,腾讯云centOS7.6环境 HOT 4
- 疑似升级,手势签到失败 HOT 1
- 大佬,我可以请教一下学习通IM获取签到的原理和大概过程吗 HOT 1
- 获取课程数据失败 HOT 5
- 如果该项目失效
- 关于TG推送自建API的选择 HOT 4
- ERR HOT 3
- 现在 手势和签到码已经无法签到成功了
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cx-auto-sign.