PHPackages                             xxx-bin/php-tls-client - 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. xxx-bin/php-tls-client

ActiveLibrary

xxx-bin/php-tls-client
======================

PHP TLS client library with JA3 fingerprinting support

v1.0.2(5mo ago)18MITPHPPHP ^7.4|^8.0

Since Dec 2Pushed 5mo agoCompare

[ Source](https://github.com/Xxx-Bin/php-tls-client)[ Packagist](https://packagist.org/packages/xxx-bin/php-tls-client)[ RSS](/packages/xxx-bin-php-tls-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

PHP TLS Client
==============

[](#php-tls-client)

A PHP wrapper for the [tls-client](https://github.com/bogdanfinn/tls-client) library using PHP's FFI (Foreign Function Interface) extension.

Description
-----------

[](#description)

This library allows you to make HTTP requests with customizable TLS fingerprints from PHP, using the power of the tls-client library through FFI. It helps bypass TLS fingerprinting techniques used by some websites to detect and block non-browser traffic.

The library provides a convenient way to simulate various browser fingerprints, allowing you to make requests that appear to come from popular browsers like Chrome, Firefox, and Safari. This makes it particularly useful for web scraping and automated testing scenarios where you need to avoid detection.

This project is based on [Sahil1337/node-tls-client](https://github.com/Sahil1337/node-tls-client), ported from Node.js to PHP. The primary improvement in this PHP version is the optimization of payload construction through dedicated builder classes.

Features
--------

[](#features)

### tls-client Features

[](#tls-client-features)

- Make HTTP/1.1 and HTTP/2 requests with custom TLS fingerprints
- Support for various browser fingerprints (Chrome, Firefox, Safari, etc.)
- Custom JA3 fingerprinting
- Proxy support
- Cookie management
- Session persistence

### PHP Wrapper Features

[](#php-wrapper-features)

- Optimized payload construction using builder patterns
- Direct h2\_fp string configuration support

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- FFI extension enabled
- Internet connection (for automatic library download)

Installation
------------

[](#installation)

### Via Composer (Recommended)

[](#via-composer-recommended)

```
composer require xxx-bin/php-tls-client
```

### Manual Installation

[](#manual-installation)

1. Make sure you have PHP 7.4+ with FFI extension enabled
2. Clone or download this repository
3. Run `composer install` to install dependencies

The required tls-client shared library will be automatically downloaded on first use.

Usage
-----

[](#usage)

```
