直接丢代码
<?php
/*
*------------------------------------------------------
* Title : 职教云自动补签PHP版 V1.00
*------------------------------------------------------
* Author : 750116098@qq.com
*------------------------------------------------------
* Time : 2020-05-11
*------------------------------------------------------
* Tips : 感谢@童话的python脚本提供参考
*------------------------------------------------------
*/
header('content-type:text/html;charset=UTF-8');
date_default_timezone_set("PRC");
error_reporting(0);
$userName="账号";//账号
$userPwd="密码";//密码
//开始login
$url1="https://zjyapp.icve.com.cn/newMobileAPI/MobileLogin/newLogin";
$curl1=curl_init();
$data=array("appVersion"=>"2.8.20","clientId"=>"04fbaf3b874041b68db529f24b5aa86b","sourceType"=>"3","userName"=>$userName,"userPwd"=>$userPwd);
curl_setopt($curl1, CURLOPT_URL, $url1);
curl_setopt($curl1, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl1, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl1, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($curl1,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl1, CURLOPT_POST, 1);
curl_setopt($curl1, CURLOPT_POSTFIELDS, $data);
$output1 = curl_exec($curl1);
curl_close($curl1);
$output1 = json_decode($output1,true);
//print_r($output1);
$usertoken = $output1['token'];
//获取course
$url2="https://zjyapp.icve.com.cn/newMobileAPI/Student/getCourseList?isPass=0&sourceType=3&stuId={$usertoken}";
$curl2=curl_init();
$headers = array(
"Content-Type"=>"application/x-www-form-urlencoded","Host"=>"zjyapp.icve.com.cn","Connection"=>"Keep-Alive","Accept-Encoding"=>"gzip","User-Agent"=>"okhttp/3.10.0"
);
$data=array("appVersion"=>"2.8.20","clientId"=>"04fbaf3b874041b68db529f24b5aa86b","sourceType"=>"3","userName"=>$userName,"userPwd"=>$userPwd);
curl_setopt($curl2, CURLOPT_URL, $url2);
curl_setopt($curl2, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl2, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl2, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl2,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl2, CURLOPT_POST, 1);
curl_setopt($curl2, CURLOPT_POSTFIELDS, $data);
$output2 = curl_exec($curl2);
curl_close($curl2);
$output2 = json_decode($output2,true);
//print_r($output2);
$course = $output2;
if($course['code']==1){
$courselist=$course['dataList'];
//print_r($courselist);
echo "有".count($courselist)."门课程"."
";
foreach($courselist as $g=>$i){
echo "序号【".$g."】课程名称:".$i['courseName']."
";
}
}
echo "
";
$url3="https://zjyapp.icve.com.cn/newMobileAPI/FaceTeach/getFaceTeachDate?courseOpenId=&faceTeachType=4&openClassId=&sourceType=3&userId={$usertoken}";
$curl3=curl_init();
$headers = array(
"Content-Type"=>"application/x-www-form-urlencoded","Host"=>"zjyapp.icve.com.cn","Connection"=>"Keep-Alive","Accept-Encoding"=>"gzip","User-Agent"=>"okhttp/3.10.0"
);
$data=array("appVersion"=>"2.8.20","clientId"=>"04fbaf3b874041b68db529f24b5aa86b","sourceType"=>"3","userName"=>$userName,"userPwd"=>$userPwd);
curl_setopt($curl3, CURLOPT_URL, $url3);
curl_setopt($curl3, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl3, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl3, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl3,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl3, CURLOPT_POST, 1);
curl_setopt($curl3, CURLOPT_POSTFIELDS, $data);
$output3 = curl_exec($curl3);
curl_close($curl3);
$output3 = json_decode($output3,true);
//print_r($output3);
$date = $output3;
if($date['code'] == 1){
$datelist = $date['dateList'];
$num = count($datelist);
foreach($datelist as $s=>$n){
echo "序号【".$s."】有签到的日期:".$n,"
";
}
}
echo "
";
//自己选择日期
$datenum=$_GET['datenum'];
if(isset($datenum)){
// $datelist[26];
$url4="https://zjyapp.icve.com.cn/newMobileAPI/FaceTeach/getStuFaceTeachList?courseOpenId=&faceDate=".$datelist[$datenum]."&openClassId=&sourceType=3&stuId={$usertoken}";
$curl4=curl_init();
$headers = array(
"Content-Type"=>"application/x-www-form-urlencoded","Host"=>"zjyapp.icve.com.cn","Connection"=>"Keep-Alive","Accept-Encoding"=>"gzip","User-Agent"=>"okhttp/3.10.0"
);
$data=array("appVersion"=>"2.8.20","clientId"=>"04fbaf3b874041b68db529f24b5aa86b","sourceType"=>"3","userName"=>$userName,"userPwd"=>$userPwd);
curl_setopt($curl4, CURLOPT_URL, $url4);
curl_setopt($curl4, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl4, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl4, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl4,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl4, CURLOPT_POST, 1);
curl_setopt($curl4, CURLOPT_POSTFIELDS, $data);
$output4 = curl_exec($curl4);
curl_close($curl4);
$output4 = json_decode($output4,true);
//print_r($output4);
$teachlist=$output4['dataList'];
//print_r($teachlist);
foreach($teachlist as $y=>$t){
echo "序号【".$y."】选择的日期的课堂有:".$t['courseName'].$t['Title']."
";
}
echo "
";
echo "
";
$ktnum=$_GET['ktnum'];
if(isset($ktnum)){
$url5="https://zjyapp.icve.com.cn/newMobileAPI/faceTeach/newGetStuFaceActivityList";
$curl5=curl_init();
$headers = array(
"Content-Type"=>"application/x-www-form-urlencoded","Host"=>"zjyapp.icve.com.cn","Connection"=>"Keep-Alive","Accept-Encoding"=>"gzip","User-Agent"=>"okhttp/3.10.0"
);
$data=array(
"activityId"=>$teachlist[$ktnum]['Id'],
"classState"=>$teachlist[$ktnum]['state'],
"openClassId"=>$teachlist[$ktnum]['openClassId'],
"sourceType"=>"3",
"stuId"=>$usertoken);
curl_setopt($curl5, CURLOPT_URL, $url5);
curl_setopt($curl5, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl5, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl5, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl5,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl5, CURLOPT_POST, 1);
curl_setopt($curl5, CURLOPT_POSTFIELDS, $data);
$output5 = curl_exec($curl5);
curl_close($curl5);
$output5 = json_decode($output5,true);
//print_r($output5);
$activity=$output5['dataList'];
foreach($activity as $d=>$a){
echo "序号【".$d."】选择的日期的课堂活动有:".$a['Title']."
";
}
echo "
";
echo "
";
$qdnum=$_GET['num'];
if(isset($qdnum)){
$url6="https://zjyapp.icve.com.cn/newMobileAPI/FaceTeach/changeSignType";
//$url6="https://security.zjy2.icve.com.cn/api/teacher/faceTeachInfos/updateIsSign";
$curl6=curl_init();
$headers = array(
"Content-Type"=>"application/x-www-form-urlencoded","Host"=>"zjyapp.icve.com.cn","Connection"=>"Keep-Alive","Accept-Encoding"=>"gzip","User-Agent"=>"okhttp/3.10.0"
);
$data="data={'SignResultType' : 1,'StuId' : '{$usertoken}','OpenClassId' :'".$teachlist[$ktnum]['openClassId']."','SignId' :'".$activity[$qdnum]['Id']."','Id' : '{$usertoken}','SourceType' : 3}&sourceType=3";
curl_setopt($curl6, CURLOPT_URL, $url6);
curl_setopt($curl6, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl6, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl6, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl6,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl6, CURLOPT_POST, 1);
curl_setopt($curl6, CURLOPT_POSTFIELDS, $data);
$output6 = curl_exec($curl6);
curl_close($curl6);
$output6 = json_decode($output6,true);
//print_r($output6);
if($output6['code'] == 1){
echo $output6['msg'];
};
}else{
echo "选择请在域名上面网址加上&num=你的选择";
exit;
};
}else{
echo "选择请在域名上面网址加上&ktnum=你的选择";
exit;
}
}else{
echo "选择请在域名上面网址加上?datenum=你的选择";
exit;
}
?>