$plat ]; // {"code":0,"data":{"result":{"success":1,"gt":"b6e5b7fad7ecd37f465838689732e788","challenge":"88148a764f94e5923564b356a69277fc","key":"230509df5ce048ca9bf29e1ee323af30"},"type":1}} return Request::getJson(true, 'other', $url, $payload); } /** * 识别验证码 * @param array $captcha * @return array */ public static function ocr(array $captcha): array { $url = 'https://captcha-v1.mudew.com:19951/'; $payload = [ 'type' => 'gt3', 'gt' => $captcha['gt'], "challenge" => $captcha['challenge'], "referer" => "https://passport.bilibili.com/" ]; $headers = [ 'Content-Type' => 'application/json', ]; return Request::postJson(true, 'other', $url, $payload, $headers); } /** * @param string $challenge * @return array */ public static function fetch(string $challenge): array { $url = getConf('login_captcha.url') . '/fetch'; $payload = [ 'challenge' => $challenge, ]; return Request::getJson(true, 'other', $url, $payload); } }