Download the PHP package kelvinzer0/curl-impersonate-php without Composer

On this page you can find all versions of the php package kelvinzer0/curl-impersonate-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?
kelvinzer0/curl-impersonate-php
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package curl-impersonate-php

# curl-impersonate-php **Stop getting blocked. Start impersonating real browsers.** [![Latest Version](https://img.shields.io/github/v/release/kelvinzer0/curl-impersonate-php?style=flat-square&color=blue)](https://github.com/kelvinzer0/curl-impersonate-php/releases) [![CI](https://img.shields.io/github/actions/workflow/status/kelvinzer0/curl-impersonate-php/ci.yml?style=flat-square&label=build)](https://github.com/kelvinzer0/curl-impersonate-php/actions) [![PHP Version](https://img.shields.io/badge/php-%3E%3D7.4-8892BF?style=flat-square&logo=php&logoColor=white)](https://php.net) [![License](https://img.shields.io/github/license/kelvinzer0/curl-impersonate-php?style=flat-square)](LICENSE) [![Downloads](https://img.shields.io/packagist/dt/kelvinzer0/curl-impersonate-php?style=flat-square&color=green)](https://packagist.org/packages/kelvinzer0/curl-impersonate-php) [![Stars](https://img.shields.io/github/stars/kelvinzer0/curl-impersonate-php?style=social)](https://github.com/kelvinzer0/curl-impersonate-php) PHP wrapper for [curl-impersonate](https://github.com/lwthiker/curl-impersonate) — execute HTTP requests that **mimic real browser TLS fingerprints**, bypassing Cloudflare, Akamai, Datadome, and other anti-bot systems. [Installation](#installation) · [Quick Start](#quick-start) · [Browser Presets](#browser-presets) · [API](#api) · [FAQ](#faq)

Why This Exists

Regular curl has a distinct TLS fingerprint. Anti-bot systems detect it instantly.

curl-impersonate uses a patched libcurl that produces the exact same TLS ClientHello as Chrome, Firefox, or Safari. Your requests become indistinguishable from a real browser.

This library wraps it in a clean PHP API — no shell scripting required.

Installation

Install curl-impersonate binary

See curl-impersonate releases for all builds.

Quick Start

Browser Presets

Preset Constant Mimics
Chrome 116 BROWSER_CHROME Chrome 116 on Windows 10
Chrome 120 BROWSER_CHROME_120 Chrome 120 on Windows 10
Firefox 102 BROWSER_FIREFOX Firefox 102 ESR on Linux
Firefox 117 BROWSER_FIREFOX_117 Firefox 117 on Linux
Safari 15.3 BROWSER_SAFARI Safari 15.3 on macOS Monterey
Safari 17.0 BROWSER_SAFARI_17 Safari 17.0 on macOS Sonoma
Edge 99 BROWSER_EDGE Edge 99 on Windows

API

Options

Constant Description Example
OPT_URL Target URL 'https://api.example.com/data'
OPT_METHOD HTTP method 'POST'
OPT_POSTFIELDS Request body (array → JSON) ['key' => 'value']
OPT_HTTP_HEADERS Headers array ['Authorization: Bearer xxx']
OPT_HEADER Include response headers true
OPT_ENGINE Path to curl-impersonate binary '/usr/local/bin/curl_chrome116'
OPT_PROXY Proxy (HTTP or SOCKS5) 'socks5://127.0.0.1:1080'
OPT_TIMEOUT Request timeout (seconds) 30
OPT_FOLLOW_LOCATION Follow redirects true
OPT_VERIFY_SSL Verify SSL certificates true
OPT_COOKIEFILE Read cookies from file '/tmp/cookies.txt'
OPT_COOKIEJAR Save cookies to file '/tmp/cookies.txt'

Methods

Examples

POST JSON with authentication

SOCKS5 proxy

Stream large responses

Scrape with cookies

FAQ

Where do I get the curl-impersonate binary?

Download from releases or install via package manager:

How do I use proxies?

Use OPT_PROXY with any proxy type curl supports:

I get "command not found" errors

Make sure curl-impersonate binaries are in your PATH or use the full path:

Does this work on shared hosting?

No. This library requires shell access to execute the curl-impersonate binary. It works on VPS, dedicated servers, Docker containers, and any environment where you can install system packages.

Comparison

Feature Native curl Guzzle This library
TLS fingerprint ❌ Bot detection ❌ Bot detection ✅ Real browser
HTTP/2 fingerprint ✅ Real browser
Ja3 fingerprint ✅ Matched
PHP API ❌ Raw resource ✅ Clean ✅ Clean
Proxy support
Streaming

Who Uses This

Contributing

See CONTRIBUTING.md.

License

MIT © Kelvin Yuli Andrian


**⭐ Star this repo if it saved you from 403s** [Report Bug](https://github.com/kelvinzer0/curl-impersonate-php/issues) · [Request Feature](https://github.com/kelvinzer0/curl-impersonate-php/issues/new)

All versions of curl-impersonate-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kelvinzer0/curl-impersonate-php contains the following files

Loading the files please wait ...