Download the PHP package eav93/wreq-php without Composer

On this page you can find all versions of the php package eav93/wreq-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?

Informations about the package wreq-php

wreq-php

A PHP HTTP client with deterministic connection reuse and browser TLS/HTTP2 fingerprinting, built on the Rust wreq crate.

Why

curl (and therefore most PHP HTTP clients) reuses TCP connections through an opaque, process-wide handle cache — you cannot reliably tell whether a keep-alive connection will be reused, or whether it leaks across unrelated handles.

wreq-php makes connection reuse explicit and deterministic:

Architecture

Two layers in one repository:

Layer What it is What it does
Native extension (wreq_php) Rust + ext-php-rs Owns the wreq::Client and its pool; executes requests; raw response.
Composer package (eav93/wreq-php) Pure PHP, Wreq\* Laravel-style ergonomics: Client, immutable PendingRequest, Response.

The native classes (Wreq\Ext\*) are a thin, fast core. The PHP layer wraps them — that is where json(), object(), resource(), the status helpers and the immutable per-request builder live.

Installation

Composer downloads a prebuilt native binary matching your PHP version, OS and architecture. Enable it in php.ini:

No prebuilt binary for your platform? Build it from source:

Docker

Install the binary with the Composer installer inside your runtime stage. It downloads the .so from the same GitHub release as the Composer package, so the native binary and the PHP wrapper can never drift apart.

Run the installer in the final image, not in a separate composer build stage — it must see the PHP version, libc and architecture the extension will actually run under (a composer image has a different PHP). It reads the installed package version through Composer and downloads wreq_php-php<X>-nts-<os>-<arch>.so from that exact release, verifying the checksum. Bump the version in one place — composer.lock — and the next build fetches the matching binary. No curl needed: the installer uses PHP's HTTP wrapper (allow_url_fopen, on by default in the official php images).

As a safety net the library also compares, on first use, the binary version (Wreq\Client::extensionVersion()) against the package version and throws Wreq\Exceptions\VersionMismatchException on a major.minor mismatch.

ZTS PHP builds are not covered — the prebuilt binary is NTS.

Usage

Client options

Every wreq::ClientBuilder setting expressible as a PHP scalar is supported.

Option Type Meaning
emulation string Browser profile (chrome_131, firefox_136, …).
emulation_os string windows, macos, linux, android, ios.
skip_http2 / skip_headers bool Emulation fingerprint toggles.
user_agent string Default User-Agent.
headers array Default headers for every request.
base_url string Prefix for relative request paths.
pool_max_idle_per_host int Idle keep-alive sockets kept per host.
pool_max_size int Max total connections in the pool.
pool_idle_timeout float Idle socket lifetime, seconds.
timeout / read_timeout / connect_timeout float Request / body-read / connect timeouts, seconds.
cookies bool Enable a per-client cookie jar.
gzip / brotli / zstd / deflate bool Toggle response decompression.
max_redirects int Redirect limit; 0 disables following.
referer bool Auto-set the Referer header.
http1_only / http2_only / https_only bool Restrict protocol / scheme.
connection_verbose bool Verbose connection tracing.
tcp_nodelay / tcp_reuse_address bool TCP socket options.
tcp_keepalive / tcp_keepalive_interval / tcp_user_timeout / tcp_happy_eyeballs_timeout float TCP timers, seconds.
tcp_keepalive_retries int TCP keep-alive probe count.
tcp_send_buffer_size / tcp_recv_buffer_size int Socket buffer sizes, bytes.
local_address string Bind to a local IP.
interface string Bind to a network interface (Unix only).
proxy string Proxy URL for all requests (http://, https://, socks4://, socks4a://, socks5://, socks5h://).
no_proxy bool Ignore proxies, including system ones.
no_hickory_dns bool Use the system DNS resolver.
resolve array DNS overrides, host => "ip:port".
verify bool Verify TLS certificate and hostname (default true).
tls_sni / tls_info bool TLS SNI / expose TLS info.
min_tls_version / max_tls_version string "1.0""1.3".

Settings that need Rust objects (client certificates, custom cert/DNS stores, HTTP/2 frame tuning, tower layers) are not exposed — use the wreq crate directly for those.

Emulation profiles

A random browser version with a fixed OS:

Development

Building the extension needs a PHP install with development files (php-config and headers). On macOS, brew install php provides them; Laravel Herd's PHP does not. Point the build at it if it is not on PATH:

The pure-PHP test suite runs without the extension; integration tests are skipped automatically when it is not loaded.

License

LGPL-3.0-or-later. The browser-emulation crate wreq-util is LGPL-3.0, and the prebuilt binaries statically link it, so the project as a whole is LGPL-3.0. See LICENSE and THIRD_PARTY_LICENSES.md for details and the relinking provisions.


All versions of wreq-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-json Version *
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 eav93/wreq-php contains the following files

Loading the files please wait ...