Douyu barrage PHP version

Making the address

I had written Python to get the bullet screen portal of Douyu, and wanted to implement it in PHP. The implementation of barrage acquisition is very simple, swoole is easy to do, and some command line format optimization has also been made in the late stage

Swoole is used to connect sockets, replacing socket functions in PHP, making it more convenient and flexible to use

Danmu [room id] = danmu [room id] = danmu [room id] = danmu [room id

Find a room where you can enjoy the barrage!

Requirements

  • Swoole extension
  • symfony/console
  • guzzlehttp/guzzle
  • jaeger/querylist

Quick Start

Pecl install swoole omit the configuration process, refer to the swoole documentation for details... 2. gitclone[email protected]:wjhtime/douyu_danmu_php.git 3. Composer install - VVV (The installation process may take a long time, PHP douyu:search < all_money > 5.php cli.php danmu <room_id=288016> or PHP danmu.phpCopy the code

Feature

  • Use Swoole to get barrage data
  • Using the Symfony/Console package, the content output is more elegant
  • Message processing, bullet-screen messages, gifts, sharing rooms and other types of processing

Screenshots

Illustrate

To Do List

  • The information classification of bullet screen is not clear enough, and there are too many unknown type data