PHPackages                             nargor/tiktok-live-connector-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. nargor/tiktok-live-connector-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

nargor/tiktok-live-connector-php
================================

PHP port of tiktok-live-connector. Receive TikTok LIVE chat / gift / like events in realtime via the Webcast push service.

1.0.1(3w ago)010MITPHPPHP &gt;=8.2

Since May 17Pushed 3w agoCompare

[ Source](https://github.com/Nargor/tiktok-live-connector-php)[ Packagist](https://packagist.org/packages/nargor/tiktok-live-connector-php)[ RSS](/packages/nargor-tiktok-live-connector-php/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (6)Versions (2)Used By (0)

tiktok-live-connector-php
=========================

[](#tiktok-live-connector-php)

A PHP library to receive TikTok LIVE stream events such as chat comments, gifts, and likes in realtime by connecting to TikTok's internal Webcast push service. This package is a PHP port of the Node.js library [tiktok-live-connector](https://github.com/zerodytrash/TikTok-Live-Connector). You only need a TikTok username (`@uniqueId`) — no credentials required to connect to public streams.

> 🇹🇭 **อ่านภาษาไทย:** [USAGE.md](USAGE.md)

Note

This is **not** a production-ready API. It is a reverse-engineering project that depends on TikTok's internal Webcast push service and on the [EulerStream](https://www.eulerstream.com) third-party sign server. For production use, prefer EulerStream's [WebSocket API](https://www.eulerstream.com/websockets).

Warning

The free EulerStream tier is heavily rate-limited. Set `SIGN_API_KEY` (see [Signing Configuration](#signing-configuration)) for any real use.

### Other language ports

[](#other-language-ports)

- **Node.js** (original): [tiktok-live-connector](https://github.com/zerodytrash/TikTok-Live-Connector) by [@zerodytrash](https://github.com/zerodytrash) and [@isaackogan](https://github.com/isaackogan)
- **Python**: [TikTokLive](https://github.com/isaackogan/TikTokLive)
- **Java**: [TikTokLiveJava](https://github.com/jwdeveloper/TikTokLiveJava)
- **Go**: [GoTikTokLive](https://github.com/steampoweredtaco/gotiktoklive)
- **C#**: [TikTokLiveSharp](https://github.com/frankvHoof93/TikTokLiveSharp)

### Table of Contents

[](#table-of-contents)

- [Getting Started](#getting-started)
- [Params and Options](#params-and-options)
- [Methods](#methods)
- [Properties](#properties)
- [Signing Configuration](#signing-configuration)
- [Events](#events)
    - [Control Events](#control-events)
    - [Message Events](#message-events)
- [Examples](#examples)

Getting Started
---------------

[](#getting-started)

1. **Install the package via Composer**

```
composer require nargor/tiktok-live-connector-php
```

Requires **PHP 8.2+** with extensions: `ext-json`, `ext-mbstring`, `ext-zlib`, `ext-sockets`.

### Platform support

[](#platform-support)

OSStatusNotesLinux✅ Fully supported`ext-pcntl` recommended for graceful Ctrl+C in CLI scripts.macOS✅ Fully supportedSame as Linux.Windows 10 / 11✅ Fully supported`pcntl` is not available; `sapi_windows_set_ctrl_handler` is used instead. Make sure `extension=sockets` is enabled in `php.ini` — it ships with PHP for Windows but is sometimes commented out.The library code itself contains no OS-specific calls. Only the example CLI in [`examples/chat-reader.php`](examples/chat-reader.php) does graceful-shutdown signal wiring, and it auto-detects the platform.

2. **Create your first TikTok LIVE chat connection**

```
