'16777215', 'fontsize' => 25, 'mode' => 1, 'msg' => $content, 'rnd' => 0, 'bubble' => 0, 'roomid' => $room_id, 'csrf' => $user['csrf'], 'csrf_token' => $user['csrf'], ]; $headers = [ 'origin' => 'https://live.bilibili.com', 'referer' => "https://live.bilibili.com/$room_id" ]; return Request::postJson(true, 'pc', $url, $payload, $headers); } public static function sendBarrageAPP(int $room_id, string $content): array { $user = User::parseCookie(); $url = 'https://api.live.bilibili.com/msg/send'; $payload = [ 'color' => '16777215', 'fontsize' => 25, 'mode' => 1, 'msg' => $content, 'rnd' => 0, 'roomid' => $room_id, 'csrf' => $user['csrf'], 'csrf_token' => $user['csrf'], ]; return Request::postJson(true, 'app', $url, Sign::common($payload)); } }