切换风格

默认晚霞 雪山 粉色心情 伦敦 花卉 绿野仙踪 加州 白云 星空 薰衣草 城市 简约黑色 简约米色 龙珠
回复 0

3848

主题

3849

帖子

1万

积分

论坛元老

Rank: 8Rank: 8

积分
12797
职教云签到最新修复API版本[复制链接]
发表于 2022-6-19 20:47:39 | 显示全部楼层 |阅读模式
哥哥们我做了免费的自动签到站点
地址:http://ykt.imz.xyz/
由于职教云貌似开始BanIP
求一些赞助赞助方式不限有用就行
自动签到程序准备搞后台接口自定义轮询
本次更新可能是最后一次更新了
由于作者即将进入实习生活
目前在青岛旅游也抽时间给大家更新啊
不得不说这个青岛站的网鱼网咖不太行
不废话了冲冲冲
<?php
/*
*------------------------------------------------------
*Title:职教云自动签到PHP版V3.2
*------------------------------------------------------
*Author:青山(qingshan@88.com)
*------------------------------------------------------
*Time:2021-03-01
*------------------------------------------------------
*Tips:更新请求header本源码不得贩卖
*------------------------------------------------------
*/
header('content-type:text/html;charset=UTF-8');
date_default_timezone_set("PRC");
/*
**获取GET参数
*/
$wxkey=$_GET['wxkey'];
//wx推送
$skey=$_GET['skey'];
//qq推送
$mail=$_GET['mail'];
//邮箱推送
$userName=$_GET['userName'];
//账号
$userPwd=$_GET['userPwd'];
//密码
/*
**跟随更新协议头
*/
$emit=time()."000";
//echodate('Y-m-dH:i:s');
$equipmentModel="XiaomiRedmiK20Pro";
$equipmentApiVersion="11";
$equipmentAppVersion=getver();
$device=getDevice($equipmentModel,$equipmentApiVersion,$equipmentAppVersion,$emit);
//header
$headers=array('Content-Type:'.'application/x-www-form-urlencoded','emit:'.$emit,'device:'.$device);
//print_r($header);
/*
**自动签到部分
*/
//login
$url="https://zjyapp.icve.com.cn/newMobileAPI/MobileLogin/newSignIn";
$data=array("clientId"=>"d902c875d5f34c0f93362139f5af0c4c","sourceType"=>"2","userPwd"=>$userPwd,"userName"=>$userName,"appVersion"=>$equipmentAppVersion,"equipmentAppVersion"=>$equipmentAppVersion,"equipmentApiVersion"=>$equipmentApiVersion,"equipmentModel"=>$equipmentModel);
//print_r($data);
$output=httppost($url,$headers,$data);
//print_r($output);
if($output['code']=="1"){
$stuId=$output["userId"];
$newtoken=$output['newToken'];
$faceDate=date("Y-m-d");
//echo$stuId;
//getjrkt
$url2="https://zjyapp.icve.com.cn/newmobileapi/faceteach/getStuFaceTeachList";
//$data="stuId={$stuId}&amp;faceDate={$faceDate}&amp;newToken={$newtoken}";
$data=array("stuId"=>$stuId,"faceDate"=>$faceDate,"newToken"=>$newtoken);
$output=httppost($url2,$headers,$data);
//print_r($output);
$todayClassInfo=$output["dataList"];
//
$url3="https://zjyapp.icve.com.cn/newmobileapi/faceteach/newGetStuFaceActivityList";
if(!empty($todayClassInfo)){
foreach($todayClassInfoas$i){
$data=array("activityId"=>$i['Id'],"stuId"=>$stuId,"classState"=>$i['state'],"openClassId"=>$i['openClassId'],"newToken"=>$newtoken);
$output=httppost($url3,$headers,$data);
//print_r($output);
$inClassInfo=$output["dataList"];
//print_r($inClassInfo);
//
$url4="https://zjyapp.icve.com.cn/newmobileapi/faceteach/isJoinActivities";
if(count($inClassInfo)!="0"){
foreach($inClassInfoas$n){
if($n["DataType"]=="签到"and$n["State"]!=="3"){
$attendData=array("activityId"=>$i['Id'],"openClassId"=>$i['openClassId'],"stuId"=>$stuId,"typeId"=>$n['Id'],"type"=>"1","newToken"=>$newtoken);
$output=httppost($url4,$headers,$attendData);
//print_r($output);
$attendInfo=$output;
$url5="https://zjyapp.icve.com.cn/newmobileapi/faceTeach/saveStuSignNew";
if($attendInfo["isAttend"]!="1"){
$signInData=array("signId"=>$n['Id'],"stuId"=>$stuId,"openClassId"=>$i['openClassId'],"sourceType"=>"3","checkInCode"=>$n['Gesture'],"activityId"=>$i['Id'],"newToken"=>$newtoken);
$output=httppost($url5,$headers,$signInData);
//print_r($output);
$time=date("Y-m-dH:i:s");
echo'{"code":"200","msg":"signsuccess","time:"'.$time.'"}';
if($output['code']!='1'){
echo'{"code":"200","msg":"signend"}';
}else{
if(isset($wxkey)){
if(strlen($wxkey)>=21){
//server酱
$url7="https://sc.ftqq.com/{$wxkey}.send";
$data=array("text"=>"职教云签到结果","desp"=>"
##{$i['courseName']}签到成功
##获取答案:sign.imz.xyz
##网课联系wx:Not-Missing
##赞助二维码:
![hqyx2icon](https://s2.ax1x.com/2020/02/12/1bfYS1.jpg)
![hqyx2icon](https://s2.ax1x.com/2020/02/12/1H4uTg.jpg)");
$output=httppost($url7,$headers,$data);
}
;
}
}
;
}else{
echo'{"code":"200","msg":"alreadysign"}';
}
;
}else{
if($n["DataType"]=="签到"){
echo'{"code":"200","msg":"alreadysign"}';
}else{
echo'{"code":"200","msg":"nosign"}';
}
}
;
}
;
}
;
}
}else{
echo'{"code":"200","msg":"nolessons"}';
}
;
}else{
echo"{'code':'206','msg':'{$output["msg"]}'}";
}
/*
**核心函数请勿更改
*/
functionhttppost($url,$headers,$data){
$curl=curl_init();
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl,CURLOPT_HEADER,0);
curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($curl,CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl,CURLOPT_POST,1);
curl_setopt($curl,CURLOPT_POSTFIELDS,http_build_query($data));
$output=curl_exec($curl);
curl_close($curl);
$output=json_decode($output,true);
return$output;
//print_r($output);
}
functioncurl_get($url,$headers,$cookie){
$curl=curl_init();
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($curl,CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl,CURLOPT_COOKIE,$cookie);
//curl_setopt($curl,CURLOPT_POST,1);
//curl_setopt($curl,CURLOPT_POSTFIELDS,$data);
$output=curl_exec($curl);
curl_close($curl);
$output=json_decode($output,true);
return$output;
//print_r($output);
}
functioncurl_post($url,$headers,$data,$cookie){
$curl=curl_init();
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($curl,CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl,CURLOPT_COOKIE,$cookie);
curl_setopt($curl,CURLOPT_POST,1);
curl_setopt($curl,CURLOPT_POSTFIELDS,$data);
$output=curl_exec($curl);
curl_close($curl);
$output=json_decode($output,true);
return$output;
//print_r($output);
}
functionpost_curl($url,$params=[],$headers=[]){
$httpInfo=array();
$ch=curl_init();
curl_setopt($ch,CURLOPT_HEADER,1);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,30);
curl_setopt($ch,CURLOPT_TIMEOUT,30);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,http_build_query($params));
curl_setopt($ch,CURLOPT_URL,$url);
$response=curl_exec($ch);
if($response===FALSE){
returnfalse;
}
curl_close($ch);
return$response;
}
//
functionobject_array($array){
if(is_object($array)){
$array=(array)$array;
}
if(is_array($array)){
foreach($arrayas$key=>$value){
$array[$key]=object_array($value);
}
}
return$array;
}
functiongetDevice($model,$vsersionAndroid,$versionName,$timeStamp){
$tmp=md5($model);
//echo$tmp."<br>";
$tmp1=$tmp.$vsersionAndroid;
//echo$tmp."<br>";
$tmp=md5($tmp1);
//echo$tmp."<br>";
$tmp1=$tmp.$versionName;
//echo$tmp."<br>";
$tmp=md5($tmp1);
//echo$tmp."<br>";
$tmp1=$tmp.$timeStamp;
//echo$tmp."<br>";
returnmd5($tmp1);
}
functiongetver(){
$url="https://zjy2.icve.com.cn/portal/AppVersion/getLatestVersionInfo";
$headers=array('Content-Type:'.'application/x-www-form-urlencoded','Host:'.'zjy2.icve.com.cn','X-Requested-With:'.'XMLHttpRequest','User-Agent:'.'Mozilla/5.0(WindowsNT10.0;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/86.0.4240.198Safari/537.36');
$output=curl_get($url,$headers,$cookie);
//print_r($output);
$version=$output['appVersionInfo']['VersionCode'];
//print_r($version);
return$version;
}
复制代码
回复看隐藏
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|不懂 ( 粤ICP备14042591号-1 )|网站地图

GMT+8, 2024-11-22 02:35 , Processed in 0.071892 second(s), 27 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

返回顶部