定制 teamspeakphp/web-query 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

teamspeakphp/web-query

最新稳定版本:v0.2.2

Composer 安装命令:

composer require teamspeakphp/web-query

包简介

PHP TeamSpeak 3 WebQuery client

README 文档

README

Latest Version on Packagist Tests Total Downloads

PHP TeamSpeak 3 WebQuery client.

Note: This package is still under active development and is not yet ready for production use.

Features

To see all commands that implemented, see COMMANDS.

Installation

Requires PHP 8.4+

You can install the package via composer:

composer require teamspeakphp/web-query

Usage

To print names of the all channels:

$teamspeak = TeamSpeak::client('100.100.100.100:10080', 'my-api-key', 1);
$channels = $teamspeak->channels()->list()->channels;

foreach ($channels as $channel) {
    echo 'Found channel '.$channel->name.PHP_EOL;
}

To print nicknames with IP addresses of the first 100 clients in the database:

$teamspeak = TeamSpeak::client('100.100.100.100:10080', 'my-api-key', 1);
$clients = $teamspeak->databaseClients()->list(limit: 100)->clients;

foreach ($clients as $client) {
    echo sprintf('Database client: %s (%s)', $client->nickname, $client->lastIpAddress);
}

Method TeamSpeak::client(...) connects to the server through ID of the virtual server, but you can connect through the port of your server using the factory:

$teamspeak = TeamSpeak::factory()
    ->withBaseUri('100.100.100.100:10080')
    ->withApiKey('my-api-key')
    ->withPort(9987)
    ->make();

Testing

composer test

统计信息

  • 总下载量: 27
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-25