Download the PHP package hejunjie/bililive without Composer

On this page you can find all versions of the php package hejunjie/bililive. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bililive

Hejunjie\Bililive

English | 简体中文

A core PHP library for Bilibili live streaming WebSocket connections, providing interfaces for login, room operations, and danmu (bullet chat) stream encryption/decryption. Paired with long-running process solutions like Workerman, you can quickly build live room applications such as danmu monitoring, gift acknowledgments, scheduled ads, and auto-replies.

PHP Version

[!WARNING] This project is for learning and communication purposes only. Commercial or illegal use is strictly prohibited.

Want a quick overview? The codebase has been parsed by Zread.

Features

Requirements

Installation

Quick Start

A minimal login → room info → WebSocket connection flow:

API Reference

Login

Method Description
Login::getQrcode() Generate a login QR code
Login::checkQrcode() Poll the QR code scan status; returns cookie on success
Login::getUserInfo() Get basic info of the currently logged-in user

Live

Method Description
Live::getRealRoomId() Get the real room ID (resolves short room IDs)
Live::getRealRoomInfo() Get live room basic info
Live::getInitialWebSocketUrl() Get WebSocket connection details
Live::getUserBarrageMsg() Get the user's danmu sending permissions for a room
Live::sendMsg() Send a danmu message
Live::reportLiveHeartbeat() Send web live heartbeat (every 60 seconds)
Live::getOnlineGoldRank() Get the room's online ranking
Live::addSilentUser() Mute a user in the room
Live::getSilentUserList() Get the room's muted user list
Live::delSilentUser() Unmute a user in the room
Live::getVipNumbers() Get the number of VIP subscriptions (Guard)
Live::getStreamerInfo() Get user basic info
Live::getMasterInfo() Get basic info of a specified UID without cookie
Live::getUserInfo() Get user basic info (deprecated, use getStreamerInfo())

WebSocket

Method Description
WebSocket::buildAuthPayload() Build authentication packet
WebSocket::buildHeartbeatPayload() Build heartbeat packet
WebSocket::parseResponsePayload() Parse response packets (auto-handles Brotli/Zlib decryption)

Example: Danmu Monitor with Workerman

The following example demonstrates how to connect to a Bilibili live room using Workerman and listen for danmu messages, gifts, and follows. Implement your own business logic inside onMessageReceived.

Related Projects

Project Description
php-bilibili-danmu-core Core Bilibili interaction module (this project)
php-bilibili-danmu-docker One-click Docker deployment
php-bilibili-danmu Main application
vue-bilibili-danmu-admin Frontend: Admin dashboard
vue-bilibili-danmu-shop Frontend: Mobile points shop

Notes


All versions of bililive with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-brotli Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hejunjie/bililive contains the following files

Loading the files please wait ...