Previous Project Next Project

TeamSpeak Banner

A PHP-powered banner for TeamSpeak 3 servers, offering dynamic server and client details with full customization and simple design integration.


Contractor:
Personal Project Logo Personal Project
Source Code:
Projektressourcen Logo Open-Source

GitHub Logo dennisabrams/teamspeak-banner
TeamSpeak Banner Image
WEB
Web icon

Introduction

Live-Generated Info Display for TeamSpeak Servers

TeamSpeak Banner is a PHP-based tool designed to generate a real-time banner image for TeamSpeak servers, combining live client data and server statistics in a clean, customizable display.

Banner

It connects to the server backend and uses a configuration file for full control over what appears on the banner.

Technologies

TeamSpeak

The system connects to the TeamSpeak server using the official TeamSpeak 3 PHP Framework to pull live client and server data, which is then rendered directly into a PNG image.

Technology / Technique

Description

PHP 7.4.3

The main scripting language used to dynamically generate the image file in real time.

TeamSpeak 3 PHP Framework

Connects to the TeamSpeak server via ServerQuery1 to fetch live client and server data.

GD Library (PHP)

Used to render the PNG image2 including fonts, icons, and text effects like rotation and shadows.

External Config File

Controls layout, text, font settings, localization, and display options without modifying core code.

Apache / nginx

Any standard web server is capable of serving the real-time banner image via a public URL.

Locale Support

Date and time formatting adjusts dynamically based on server-side locale settings.

RFC 3986 Encoding

Automatically encodes ServerQuery credentials to handle special characters3 securely.

1 ServerQuery access must be enabled and configured on the TeamSpeak server for the PHP Framework to function properly. The connection uses a username/password combo to authenticate each request.

2 GD Library allows text to be drawn at any angle or size, using TrueType fonts (.ttf). It also supports transparency for rendering cleaner overlays or logo placement.

3 Encoding the ServerQuery credentials ensures compatibility with special characters like @, &, or spaces that could otherwise break URL queries or connection strings. This improvement came from a GitHub issue where a user had login problems due to special characters in their ServerQuery password.

Development Process

The project was built to prioritize flexibility and user control. Rather than hardcoding values, every visual and informational element is configured externally, making it easy to deploy across different servers with unique branding or languages.

Server Connection

ServerQuery Protocol: The script authenticates via the TeamSpeak ServerQuery protocol.

Virtual Server Object: Once connected, a virtual server object is spawned to access full client and server data.

Server Connection

Connection Method: Uses TeamSpeak3::factory() to establish connection.

TeamSpeak3::factory()

Security: URL-encodes credentials for authentication.

Data Handling

Client Info: Upload & download (last minute), nickname, online time, country flag, total connections.

Server Info: Name, version, active/total clients, uptime, group icons, and date/time.

Data Handling

Server Statistics: Retrieves real-time data including server name, client count, and connection details.

$ts3->virtualserver_name
$cl->getProperty(‘client_ip’)

Client Detection: Compares visitor IP with connected clients to personalize banner content.

Image Rendering

PHP GD Library: Using PHP’s GD library, the banner is generated in real-time.

Advanced Features: Supports transparent PNGs, custom fonts, shadowed text, and layering.

Image Rendering

GD Library Processing: Creates banner from background image with blur effects.

imagecreatefromstring()
drawtext() + imagecopy()

Dynamic Drawing: Renders text, shapes, and flags with real-time PNG output.

Banner Setup

Server Integration: Once deployed, the banner can be integrated into any TeamSpeak 3 server via Virtual Server Settings.

Automatic Updates: TeamSpeak reloads the image every 60 seconds based on the Gfx Interval.

Banner Setup

Server Integration: Integrates seamlessly into TeamSpeak 3 server settings with 60-second refresh interval.

60 seconds

Universal Compatibility: Works with any TeamSpeak server configuration and automatically reloads banner content.

Technical Architecture

The banner system leverages PHP’s GD library and TeamSpeak’s ServerQuery API to create dynamic, real-time graphics. Each component is designed for modularity and performance, ensuring fast response times while maintaining visual quality and personalization features.

Complete Data Flow

PHP
Script Initialization
Loads config & libraries
TS3
ServerQuery
Authenticates & connects
DATA
Collection
Server & client info
GD
Image Processing
Draws banner elements
PNG
Output
Real-time banner

Smart Client Detection

• Compares visitor IP with connected clients
• Shows personalized stats if connected
• Displays upload/download, online time, country flag
• Server group icons and admin detection

Advanced Image Processing

• Dynamic text positioning with custom fonts
• Gaussian blur effects on background
• Transparent overlays and color blending
• Real-time PNG generation with proper headers
Project Preview
// Behind the scenes
This site wasn’t built with a template or CMS. It’s manually coded using components and utility-based styling.
Curious about the architecture? The complete source code is available for exploration.
View on GitHub →