{$data['code']} MSG -> {$data['message']} "); die(); } return true; } /** * @use 用户 * @return mixed */ public static function userInfo() { $url = 'https://api.bilibili.com/x/web-interface/nav'; $payload = []; $headers = [ 'origin' => 'https://space.bilibili.com', 'referer' => 'https://space.bilibili.com/' . getUid(), ]; $raw = Curl::get('pc', $url, $payload, $headers); return json_decode($raw, true); } }