Download the PHP package vxsilisk/pulsarx without Composer
On this page you can find all versions of the php package vxsilisk/pulsarx. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vxsilisk/pulsarx
More information about vxsilisk/pulsarx
Files in vxsilisk/pulsarx
Package pulsarx
Short Description Browser-impersonating HTTP client for PHP — like curl_cffi/requests, but native. 32 TLS fingerprints, Sec-Fetch/Referer stealth, async (curl_multi), session cookies & multipart. Zero dependencies.
License MIT
Homepage https://github.com/Vxsilisk/PulsarX
Informations about the package pulsarx
[**Why PulsarX**](#-why-pulsarx) · [**Install**](#-installation) · [**Quick start**](#-quick-start) · [**Sessions**](#-sessions--cookies) · [**Impersonate**](#-impersonation) · [**Anti-detection**](#-anti-detection) · [**Retries**](#-retries-params--redirects) · [**Async**](#-async-parallel) · [**Uploads**](#-multipart--file-uploads) · [**API**](#-api-reference)
✦ Features
| Feature | What it does | |
|---|---|---|
| ❍ | Session model | Cookies persist in memory across requests, scoped by domain / path / expiry — like requests.Session. No files touch disk. |
| ◈ | Impersonation | 32 version-pinned browser fingerprints (Chrome, Edge, Firefox, Safari — desktop, Android & iOS). |
| ✸ | Anti-detection | Coherent Sec-Fetch-Site + Referer chains (stealth()) and whole-profile rotation (rotate()). |
| ⟡ | Async | Parallel requests over curl_multi with a rolling concurrency window and near-zero idle CPU. |
| ❖ | Multipart | multipart/form-data and file uploads via a fluent Mime builder (on-disk or in-memory). |
| ⌗ | JSON-first | json: body param, plus Response::json(), ok() and getElapsed(). |
| ⬡ | Zero deps | One class per file, a tiny autoloader, and optional Composer. Just PHP + ext-curl. |
✦ Why PulsarX?
PHP has great HTTP clients — but none of them can look like a browser. That's the gap
PulsarX fills: it's the PHP answer to Python's curl_cffi.
| PulsarX | Guzzle | Symfony HttpClient | curl_cffi (Python) | |
|---|---|---|---|---|
| Language | PHP | PHP | PHP | Python |
| Browser impersonation | ✓ 32 targets | ✗ | ✗ | ✓ |
Anti-detection (Sec-Fetch / Referer) |
✓ | ✗ | ✗ | partial |
| Fingerprint rotation | ✓ | ✗ | ✗ | ✓ |
| Async / parallel | ✓ curl_multi |
✓ | ✓ | ✓ |
| Scoped session cookies | ✓ | ✓ | ✓ | ✓ |
| Multipart / file uploads | ✓ | ✓ | ✓ | ✓ |
| Runtime dependencies | none | several | none | C / curl-impersonate |
On stock OpenSSL the TLS layer is approximate, not a byte-exact JA3 — see Anti-detection. For an exact fingerprint, run PHP against a
curl-impersonatelibcurl (auto-detected).
⬡ Installation
With Composer
Without Composer — require the bundled autoloader:
Requirements: PHP ≥ 8.1 with the
curlandjsonextensions.
✷ Quick start
❍ Sessions & cookies
A Pulsar instance is a session. Cookies set by the server are stored in memory
and re-sent automatically on later requests — correctly scoped by domain, path and
expiry.
Cookies are isolated by host — a cookie from shop.com is never leaked to
api.stripe.com. You can also pre-seed the jar:
◈ Impersonation
Mimic a real browser's fingerprint — User-Agent, the full header set in browser order, TLS cipher list, EC curves, HTTP/2 and Brotli/ZSTD. Chainable:
Your own headers merge on top of the profile (overriding by name, preserving order):
◇ All 32 targets (or call Pulsar::impersonateTargets() at runtime)
| Browser | Targets | |---------|---------| | ❯ **Chrome** (desktop) | `chrome99` `chrome110` `chrome116` `chrome119` `chrome120` `chrome124` `chrome131` `chrome133` `chrome136` `chrome142` `chrome146` `chrome` | | ❯ **Chrome** (Android) | `chrome99_android` `chrome131_android` `chrome_android` | | ❯ **Edge** | `edge99` `edge101` `edge131` `edge` | | ❯ **Firefox** | `firefox133` `firefox135` `firefox144` `firefox` | | ❯ **Safari** (macOS) | `safari153` `safari170` `safari180` `safari260` `safari` | | ❯ **Safari** (iOS) | `safari172_ios` `safari180_ios` `safari_ios` | | ❯ **Tor** | `tor` | > Bare names like `chrome`, `safari`, `firefox` are aliases for the latest stable build.
[!NOTE] About JA3 accuracy. PulsarX runs on stock OpenSSL, so impersonation matches the HTTP layer and the TLS cipher ordering — strong, but not a byte-exact JA3/JA4 (TLS extension order, GREASE, ALPS and HTTP/2 SETTINGS require BoringSSL).
If you run PHP against a
curl-impersonatelibcurl, PulsarX auto-detects the extra options (ALPS, cert compression, extension permutation, no-server-push) and produces an exact fingerprint — no code change needed.
✸ Anti-detection
Bot detection checks coherence across layers — it catches you when something doesn't line up. PulsarX gives you two tools beyond raw impersonation, both fully working on stock OpenSSL.
Behavioural coherence — stealth()
A naive client always sends Sec-Fetch-Site: none with no Referer. A real browser
derives both from where it navigated from. Enable stealth() and PulsarX maintains that
context across the session automatically:
The Referer honours the default strict-origin-when-cross-origin policy — full URL
within a site, origin-only across sites. Anything you set by hand always wins.
Fingerprint rotation — rotate()
Since Chrome 110, browsers randomise TLS extension order — so a single static fingerprint is itself suspicious. Rotation picks a fresh, coherent profile (UA + sec-ch-ua + TLS all in sync) on every request:
[!IMPORTANT] Rotation varies whole profiles, never fields within one. Randomising the
sec-ch-uabrand order or mixing a Chrome UA with a Firefox header set is a mismatch signal that makes you easier to flag, not harder — so PulsarX never does it.None of this forges a byte-exact JA3/JA4 on OpenSSL, and no HTTP client clears JavaScript challenges (Cloudflare Turnstile et al.). For hardened anti-bots you still need a
curl-impersonatelibcurl or a headless browser.
⟡ Async (parallel)
Build promises with getAsync() / postAsync() / requestAsync(), then resolve a
batch with pool(). It uses curl_multi with a rolling concurrency window and
curl_multi_select, so idle CPU stays near zero while requests are in flight.
Prefer callbacks? Each promise resolves as soon as it finishes:
❖ Multipart & file uploads
A fluent multipart/form-data builder — PulsarX's take on curl_cffi's CurlMime:
Or declaratively, from a list:
⌗ JSON body
A plain array passed as
$datais still JSON-encoded (legacy behaviour). To send multipart instead, pass aMimeor an array containing aCURLFile.
↻ Retries, params & redirects
Retries with backoff — resilient against transient network errors and 429/5xx:
Query params — built and appended for you:
Per-request timeout and redirect control:
Throw on error — opt into exceptions instead of checking ok() (sync requests):
[!IMPORTANT] TLS verification is ON by default (secure). Disable it explicitly when a target has a broken/self-signed certificate:
⇄ Proxy
◇ Constructor options
Override any cURL default by passing options to the constructor:
❯ API reference
HTTP methods — every method returns a Response.
All methods accept params: (query array) and timeout: (seconds).
| Sync | Async (returns Promise) |
|---|---|
get($url, $headers?, $cookie?, $server?, $params?, $timeout?) |
getAsync(..., $params?, $key?) |
post($url, $data?, $headers?, $cookie?, $server?, $json?, $params?, $timeout?) |
postAsync(..., $json?, $params?, $key?) |
put / patch / delete($url, $data?, …) |
requestAsync($method, $url, …, $key?) |
custom($url, $method, $data?, …) |
pool(array $promises, int $concurrency = 10): Response[] |
Session policy (chainable)
| Method | Effect |
|---|---|
retries($times = 3, $baseDelay = 0.5, $on = null) |
retry transport errors + given statuses with backoff |
redirects($follow = true, $max = 20) |
redirect-following policy |
throwOnError($on = true) |
throw PulsarException on 4xx/5xx (sync) |
new Pulsar($config = [], verify: true) |
TLS verification (on by default) |
Impersonation
| Method | Returns |
|---|---|
impersonate(string\|Profile $target) |
$this — fixed profile ('random' picks one) |
rotate(?array $targets = null) |
$this — fresh coherent profile per request |
stealth(bool $on = true) |
$this — auto Sec-Fetch-Site + Referer chain |
clearImpersonation() |
$this |
Pulsar::impersonateTargets() |
string[] of every target |
Response
| Method | Description |
|---|---|
isSuccess() |
transport succeeded |
ok() |
status in [200, 400) |
getStatusCode() |
HTTP status code |
getBody() |
raw response body |
json($assoc = true) |
decoded JSON body |
getHeaders() |
request + response headers |
getReason() |
error message, if any |
getElapsed() |
transfer time in seconds |
getUrl() |
final URL after redirects |
getRedirectCount() |
number of redirects followed |
❏ Project layout
Run
php example.phpto see sessions, impersonation, multipart, JSON and async in action.
All versions of pulsarx with dependencies
ext-curl Version *
ext-json Version *