影片直播app原始碼,傳送驗證碼 驗證碼識別

zhibo系統開發發表於2023-10-11

影片直播app原始碼,傳送驗證碼 驗證碼識別

<?php
 
//phone: 13255445454
 
 
    //{"code":200,"msg":"成功","data":{"exist":false,"hasMobile":false,"userId":"11120003","accessToken":"03869f857aed4ae799447aa3c7b47253","expireAt":1596784644814,"userType":99,"needInfo":false}}
    
    //{"code":200,"msg":"成功","data":{"needUnbind":false,"userId":"26724814","accessToken":"00a0a32b02a2446da93128114f65e27a","expireAt":1596784841526,"userType":99,"needInfo":true,"nickName":"哆覓隊長。        (請)"}}
// 151
$access_token = "03869f857aed4ae799447aa3c7b47253";
$userId = "11120003";
 
 
$access_token = "00a0a32b02a2446da93128114f65e27a";
$userId = "26724814";
 
 
$cmd = isset($_REQUEST["cmd"]) ? $_REQUEST["cmd"] : "";
$phone = isset($_REQUEST["phone"]) ? $_REQUEST["phone"] : "";
$code = isset($_REQUEST["code"]) ? $_REQUEST["code"] : "";
if($cmd == "sencode" && $phone){
    getValidateCode($phone);
}
elseif ($cmd =="login" && $phone && $code) {
    loginByAuth($phone,$code);
}
else{
    // echo getValidateCode("13244774".rand(111, 999));
    // verifySms_service("13244774");
    // sendCodeWithOptionalValidate("13244774","e7b2");
    
    userIsPasswordSetting();
    getDayStep();
    // getUserInfo();
    uploadMobileStepV2();
}
 
 
 
 
//傳送驗證碼
function sendCodeWithOptionalValidate($mobile,$code){
    $url = "https://sports.lifesense.com/sms_service/verify/sendCodeWithOptionalValidate?sessionId=nosession&requestToken=3EC686B1B19873456C6274E82B348F6D&rnd=683730ED&ts=1594127468&appType=6&longitude=107.2135104709201&latitude=30.74249213324653&network_type=wifi&systemType=1&version=4.6.2&osversion=10.3.1&platform=ios&screenwidth=375&screenheight=667&requestId=0190ad1106f24fc8bcb6bb7fd19a6900&area=CN&language=zh&openudid=CFB5918C-DCCC-45B4-8D13-A793F513B9D4&devicemodel=iPhone%206S&os_country=CN&os_langs=zh&promotion_channel=app_store&timezone=Asia/Shanghai";
    
    $frmo = '{"mobile":"'.$mobile.'","extParam":"3","code":"'.$code.'","busiType":"default","type":"0","appType":"0","timestamp":"'.time().'909"}';
    $retText = HttppostTx($url,$frmo);
    
    
    //echo $retText;
    $j = json_decode($retText);
    $resmsg = $j->data->msg;
    if(!$resmsg){
        $resmsg = $j->msg;
    }
    
   // echo $resmsg;
    
    return $resmsg;
    
    //{"code":416,"msg":"圖片驗證碼已失效,請重新輸入圖片驗證碼"}
    //{"code":200,"msg":"成功","data":{"code":0,"msg":"傳送成功"}}
    
//     POST https://sports.lifesense.com/sms_service/verify/sendCodeWithOptionalValidate?sessionId=nosession&requestToken=3EC686B1B19873456C6274E82B348F6D&rnd=683730ED&ts=1594127468&appType=6&longitude=107.2135104709201&latitude=30.74249213324653&network_type=wifi&systemType=1&version=4.6.2&osversion=10.3.1&platform=ios&screenwidth=375&screenheight=667&requestId=0190ad1106f24fc8bcb6bb7fd19a6900&area=CN&language=zh&openudid=CFB5918C-DCCC-45B4-8D13-A793F513B9D4&devicemodel=iPhone%206S&os_country=CN&os_langs=zh&promotion_channel=app_store&timezone=Asia/Shanghai HTTP/1.1
// Host: sports.lifesense.com
// Content-Type: application/json
// Connection: keep-alive
// Accept: */*
// User-Agent: LSWearable/4.6.2 (iPhone; iOS 10.3.1; Scale/2.00)
// Accept-Language: zh-Hans-CN;q=1, en-US;q=0.9
// Content-Length: 127
// Accept-Encoding: gzip, deflate
 
// {"mobile":"13244774725","extParam":"3","code":"aaaa","busiType":"default","type":"0","appType":"0","timestamp":"1594127468909"}
}
 
function loginByAuth($mobile="",$msgcode=""){
    $url = "https://sports.lifesense.com/sessions_service/loginByAuth?clientId=5b3e61a3c2d448e39ef7a0273c0b138f&screenWidth=375&screenHeight=667&requestToken=9A7503811B726D3782E67524DAEFC00F&rnd=F04ACA3A&ts=1594128019&appType=6&longitude=107.2135104709201&latitude=30.74249213324653&network_type=wifi&systemType=1&version=4.6.2&osversion=10.3.1&platform=ios&screenwidth=375&screenheight=667&requestId=889a7cd9204748808e715a4504ef0d0d&area=CN&language=zh&openudid=CFB5918C-DCCC-45B4-8D13-A793F513B9D4&devicemodel=iPhone%206S&os_country=CN&os_langs=zh&promotion_channel=app_store&timezone=Asia/Shanghai";
    
    $frmo = '{"clientId":"5b3e61a3c2d448e39ef7a0273c0b138f","appType":6,"loginName":"'.$mobile.'","authCode":"'.$msgcode.'","timestamp":"'.time().'974"}';
    
    //$retText = HttppostTx($url,$frmo);
    $retText = '{"code":200,"msg":"成功","data":{"exist":false,"hasMobile":false,"userId":"11120003","accessToken":"03869f857aed4ae799447aa3c7b47253","expireAt":1596784644814,"userType":99,"needInfo":false}}';
    
    $j = json_decode($retText);
    $code = $j->code;
    $msg = $j->msg;
    
    $userId = $j->data->userId;
    $accessToken = $j->data->accessToken;
    $expireAt = $j->data->expireAt;
    $userType = $j->data->userType;
    
    
    $arrRet["mobile"]=$mobile;
    $arrRet["code"]=$code;
    $arrRet["msg"]=$msg;
    $arrRet["userId"]=$userId;
    
    
    $arrRet["accessToken"]=$accessToken;
    $arrRet["expireAt"]=$expireAt;
    $arrRet["userType"]=$userType;
    
    echo json_encode($arrRet);
    //{"code":412,"msg":"驗證碼錯誤"}
    
    //{"code":200,"msg":"成功","data":{"exist":false,"hasMobile":false,"userId":"11120003","accessToken":"03869f857aed4ae799447aa3c7b47253","expireAt":1596784644814,"userType":99,"needInfo":false}}
    
    //{"code":200,"msg":"成功","data":{"needUnbind":false,"userId":"26724814","accessToken":"00a0a32b02a2446da93128114f65e27a","expireAt":1596784841526,"userType":99,"needInfo":true,"nickName":"哆覓隊長。        (請)"}}
    
    //{"accessToken":"00a0a32b02a2446da93128114f65e27a","appType":6,"expireAt":1596784841526,"loginId":"26724814","userType":99,"gray":false}; 
    
// Content-Type: application/json
// User-Agent: LSWearable/4.6.2 (iPhone; iOS 10.3.1; Scale/2.00)
// Cookie: session=%7B%22accessToken%22%3A%2200a0a32b02a2446da93128114f65e27a%22%2C%22appType%22%3A6%2C%22expireAt%22%3A1596784841526%2C%22loginId%22%3A%2226724814%22%2C%22userType%22%3A99%2C%22gray%22%3Afalse%7D; 
    
    // echo $retText;
    
}
//獲取當前步數
function getDayStep(){
    $url = "
    // $frmo = '{"timestamp":"'.time().'551"}';
    $retText = HttppostTx($url,$frmo,getCookie());// 
    //{"code":200,"msg":"成功","data":{"step":0,"activeStep":0,"mobileStep":0,"calories":0.0,"calorieBananas":0.0,"calorieFat":0.0,"distance":0.0,"distanceGround":0.0,"distanceCarbon":0.0,"lengthUnit":1,"lastStep":0,"value":0.0,"targetValue":8000.0,"targetType":1,"combo":0,"targetState":0,"detailUrl":"}}
    $j = json_decode($retText);
    $step = $j->data->step;
    
    echo $step;
    
}
function getUserInfo(){
    $url = "
    $frmo = '{"timestamp":"'.time().'000"}';
    $retText = HttppostTx($url,$frmo,getCookie());// 
    //{"code":200,"msg":"成功","data":{"users":[{"id":26724814,"lifesenseId":"27724814","name":"藏進星河","headImg":"http://thirdwx.qlogo.cn/mmopen/vi_32/1e9kRmHcJA0ZfPicB3GUwKibofbibJhk4pI0FB3HFI4YdcYjG6AgaLFuQ1ymuUav8NfT928oHcvHCUKrStdh81EZA/132","sex":2,"birthday":"1987-07-15","mobile":"15182861758","height":150.0,"waist":80.0,"wechat":true,"qq":false,"updated":1594202893000,"created":1594192841000,"deleted":false,"clientId":"5b3e61a3c2d448e39ef7a0273c0b138f","wechatUnionId":"oNlWht1Sy-KnVOcz4RFYd4rjwzcE","managerId":0,"appVersion":"4.6.2"}],"managedUsers":[],"subscribedUsers":[]}}
    
    
    echo $retText;
}
//獲取是否設定密碼
function userIsPasswordSetting(){
    $url = "https://sports.lifesense.com/user_service/load/loadAccountStatus?requestToken=37686F9DD33A324FAAEEB59C6672C9ED&rnd=82B1237C&ts=1594201275&accesstoken=00a0a32b02a2446da93128114f65e27a&userId=26724814&appType=6&longitude=107.213776312934&latitude=30.74225477430555&network_type=wifi&systemType=1&version=4.6.2&osversion=10.3.1&platform=ios&screenwidth=375&screenheight=667&requestId=9c511bfcbc1e46d6a2b0cf59d42941ba&area=CN&language=zh&openudid=CFB5918C-DCCC-45B4-8D13-A793F513B9D4&devicemodel=iPhone%206S&os_country=CN&os_langs=zh&promotion_channel=app_store&city=%E8%BE%BE%E5%B7%9E&cityCode=511700&province=%E5%9B%9B%E5%B7%9D%E7%9C%81&provinceCode=510000&areaCode=511724&country=%E4%B8%AD%E5%9B%BD&timezone=Asia/Shanghai";
    $frmo = '{"timestamp":"'.time().'551"}';
    
    $retText = HttppostTx($url,$frmo,getCookie());// 
    
   //{"code":200,"msg":"成功","data":{"mobile":"15xxxxx8","passwordSetting":false,"wechatBinding":true,"qqBinding":false,"wechatName":"哆覓隊長。        (請)"}} 
   //{"code":200,"msg":"成功","data":{"mobile":"13xxxxx3","passwordSetting":true,"wechatBinding":true,"qqBinding":true,"wechatName":"哄哄"}}
   //{"code":401,"msg":"客戶端未登入"}
   
    $j = json_decode($retText);
    $code = $j->code;
    
   echo $retText;
    
}
 
function getCookie(){
    global $access_token;
    global $userId;
    //00a0a32b02a2446da93128114f65e27a
    $session = "Cookie: session=%7B%22accessToken%22%3A%22".$access_token."%22%2C%22appType%22%3A6%2C%22expireAt%22%3A".time()."526%2C%22loginId%22%3A%22".$userId."%22%2C%22userType%22%3A99%2C%22gray%22%3Afalse%7D;";
    
    // $session = "Cookie: session=%7B%22accessToken%22%3A%2200a0a32b02a2446da93128114f65e27a%22%2C%22appType%22%3A6%2C%22expireAt%22%3A1596784841526%2C%22loginId%22%3A%2226724814%22%2C%22userType%22%3A99%2C%22gray%22%3Afalse%7D; ";
    return $session;
}
 
function uploadMobileStepV2($step=6666){
    $url = "
//     POST https://sports.lifesense.com/sport_service/sport/sport/uploadMobileStepV2?accesstoken=00a0a32b02a2446da93128114f65e27a&userId=26724814&appType=6&longitude=107.213776312934&latitude=30.74225477430555&network_type=wifi&systemType=1&version=4.6.2&osversion=10.3.1&platform=ios&screenwidth=375&screenheight=667&requestId=342d6b1fa7d4476db3f1df692cc1fe09&area=CN&language=zh&openudid=CFB5918C-DCCC-45B4-8D13-A793F513B9D4&devicemodel=iPhone%206S&os_country=CN&os_langs=zh&promotion_channel=app_store&city=%E8%BE%BE%E5%B7%9E&cityCode=511700&province=%E5%9B%9B%E5%B7%9D%E7%9C%81&provinceCode=510000&areaCode=511724&country=%E4%B8%AD%E5%9B%BD&timezone=Asia/Shanghai HTTP/1.1
// Host: sports.lifesense.com
// Content-Type: application/json
// Cookie: accessToken2=00a0a32b02a2446da93128114f65e27a; appType2=6; expireAt2=1596784841526; gray2=false; loginId2=26724814; session=%7B%22accessToken%22%3A%2200a0a32b02a2446da93128114f65e27a%22%2C%22appType%22%3A6%2C%22expireAt%22%3A1596784841526%2C%22loginId%22%3A%2226724814%22%2C%22userType%22%3A99%2C%22gray%22%3Afalse%7D; userType2=99; accessToken=00a0a32b02a2446da93128114f65e27a; userId=26724814; accessToken2=00a0a32b02a2446da93128114f65e27a; appType2=6; expireAt2=1596784841526; gray2=false; loginId2=26724814; session=%7B%22accessToken%22%3A%2200a0a32b02a2446da93128114f65e27a%22%2C%22appType%22%3A6%2C%22expireAt%22%3A1596784841526%2C%22loginId%22%3A%2226724814%22%2C%22userType%22%3A99%2C%22gray%22%3Afalse%7D; userType2=99
// Connection: keep-alive
// Accept: */*
// User-Agent: LSWearable/4.6.2 (iPhone; iOS 10.3.1; Scale/2.00)
// Accept-Language: zh-Hans-CN;q=1, en-US;q=0.9
// Content-Length: 315
// Accept-Encoding: gzip, deflate
 
// {"timestamp":"1594193293373","list":[{"id":"4622bf6f835aa7f43f5aa4708b8b57b3b13","calories":"0","deviceId":"M_3B33F2F56C710C1C23693F6A6661C04A05C268FF","type":"0","dataSource":"3","userId":"26724814","priority":"0","step":"0","created":"2020-07-08 15:28:13","distance":"0","measurementTime":"2020-07-08 15:28:13"}]}
    global $userId;
    $frmo = '{"timestamp":"'.time().'373","list":[{"id":"4622bf6f835aa7f43f5aa4708b8b57b3b13","calories":"0","deviceId":"M_3B33F2F56C710C1C23693F6A6661C04A05C268FF","type":"0","dataSource":"3","userId":"'.$userId.'","priority":"0","step":"'.$step.'","created":"2020-07-08 15:28:13","distance":"0","measurementTime":"2020-07-08 15:28:13"}]}';
    
    $retText = HttppostTx($url,$frmo,getCookie());// 
    echo $retText;
 
}

以上就是影片直播app原始碼,傳送驗證碼 驗證碼識別, 更多內容歡迎關注之後的文章


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69978258/viewspace-2988163/,如需轉載,請註明出處,否則將追究法律責任。

相關文章