PHPackages                             thevenrex/curlx - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. thevenrex/curlx

ActiveLibrary[HTTP &amp; Networking](/categories/http)

thevenrex/curlx
===============

HTTP basic library written in PHP

0.0.5(1y ago)25MITPHP

Since Aug 21Pushed 1y agoCompare

[ Source](https://github.com/ThevenRexOff/curlx)[ Packagist](https://packagist.org/packages/thevenrex/curlx)[ RSS](/packages/thevenrex-curlx/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

CurlX v2.0.0b
=============

[](#curlx-v200b)

CurlX is an HTTP basic library written in PHP for human beings and has no dependencies, working with PHP 8.2+.

[![](https://camo.githubusercontent.com/acc016cdbb674d87026a5079a2e7d3f89c29869650b8fc1a5414a77f8cb9a34b/68747470733a2f2f692e696d6775722e636f6d2f41567753366b5a2e706e67)](https://camo.githubusercontent.com/acc016cdbb674d87026a5079a2e7d3f89c29869650b8fc1a5414a77f8cb9a34b/68747470733a2f2f692e696d6775722e636f6d2f41567753366b5a2e706e67)

CurlX allows you to send **GET**, **POST**, **PUT**, **DELETE** AND MORE HTTP METHODS. You can add headers, form data, json data, and parameters with simple arrays, and access the response data in the same way. You can add an HTTP TUNNEL with PROXY, server ROTATIONS like [LUMINATI](https://luminati.io/), [APIFY](https://apify.com/), [IPVANISH](https://www.ipvanish.com/).

GET, POST AND CUSTOM Syntax
---------------------------

[](#get-post-and-custom-syntax)

```
# GET
$CurlX->get("https://api.myip.com/");

# POST
$CurlX->post("https://api.myip.com/", "my_form_id=test&hello=mom");

# CUSTOM
$CurlX->custom("https://api.myip.com/", "HEAD");
$CurlX->run();
```

HTTP TUNNEL SYNTAX
------------------

[](#http-tunnel-syntax)

```
# PROXY (http/s, socks4, socks5)
$server = [
    "method" => "tunnel",
    "server" => "47.254.145.99:3128"
];

# LIMINATI valid syntax example
$session => mt_rand();
$server = [
    "method" => "custom",
    "server" = "http://zproxy.lum-superproxy.io:22225",
    "auth" => "lum-customer-hl_876f552a-zone-static-route_err-pass_dyn-country-RU-session-$session:my_ultra_secret_password"
];

# APIFY valid syntax example
$server = [
    "method" => "custom",
    "server" = "http://proxy.apify.com:8000",
    "auth" => "auto:my_ultra_secret_password"
];

# IPVANISH valid syntax example
$server = [
    "method" => "CUSTOM",
    "server" => "akl-c12.ipvanish.com:1080",
    "auth"   => "my_zone_customer_id:my_zone_customer_password"
];
```

GET SYNTAX
----------

[](#get-syntax)

```
# Simple GET
$test0 = $CurlX->get("http://httpbin.org/get");

# GET with Custom Headers
$headers = array(
    "Host: api.myip.com",
    "my-custom-header: my-header-value"
);

$test1 = $CurlX->get("http://httpbin.org/get", $headers);

# GET with Headers and Cookie File
$cookie = uniqid();

$test2 = $CurlX->get("http://httpbin.org/get", $headers, $cookie);

#GET with Headers, Cookie and Proxy Tunnel
$server = [
    "method" => "tunnel",
    "server" => "47.254.145.99:3128"
];

$test3 = $CurlX->get("http://httpbin.org/get", $headers, $cookie, $server);

# After all requests were complete, you can delete the cookie file, Only when you use the $cookie parameter.
$CurlX->deleteCookie();

# Response status of the request
var_dump($test3->isSuccess());
// bool(true)

# Status code of the request
var_dump($test3->getStatusCode());
// int(200)

# Content type of the request
var_dump($test3->getHeaders()["response"]["content-type"]);
// string(24) "text/html; charset=UTF-8"

# Body response of the request
var_dump($test3->getBody());
// string(51) "{...}"
```

POST SYNTAX
-----------

[](#post-syntax)

```
#Simple POST with NULL data
$test0 = $CurlX->post("http://httpbin.org/post");

#POST with Data-form and Custom Headers
$headers = array(
    "Host: httpbin.org",
    "my-custom-header: my-header-value"
);
$test1 = $CurlX->post("http://httpbin.org/post", "test_ID=666&hello=mom", $headers);

#POST with Json-Data and Custom Headers
$data = array(
    "hello" => "mom",
    "key" => "value"
);
$test2 = $CurlX->post("http://httpbin.org/post", $data, $headers);

#POST with Custom-Data, Custom Headers, and Cookie
$cookie = uniqid();
$test3 = $CurlX->post("http://httpbin.org/post", $data, $headers, $cookie);

#POST with Json-Data, Custom Headers, Cookie and Proxy Tunnel
$server = [
    "method" => "tunnel",
    "server" => "47.254.145.99:3128"
];
$test4 = $CurlX->post("http://httpbin.org/post", $data, $headers, $cookie, $server);
#After all requests were complete, you can delete the cookie file, Only when you use the $cookie parameter.
$CurlX->deleteCookie();

# Response status of the request
var_dump($test3->isSuccess());
// bool(true)

# Status code of the request
var_dump($test4->getStatusCode());
// int(200)

# Content type of the request
var_dump($test4->getHeaders()["response"]["content-type"]);
// string(24) "..."

# Body response of the request
var_dump($test4->getBody());
// string(51) "{...}"
```

Other functions
---------------

[](#other-functions)

```
    // Set a custom option to current CURL structure
    $CurlX->setOpt([CURLOPT_HTTPAUTH => CURLAUTH_BEARER]);

    /**
     * Show all data process|errors of the request
     *
     * debug(): now supports cli and json print
     *
     * Recommended for develop work space
    */
    $CurlX->debug();
```

More?
-----

[](#more)

- More examples in [examples](https://github.com/devblack/curlx/tree/master/examples) dir.

Features
--------

[](#features)

- International Domains and URLs
- Custom Tunnel Http with Proxy, Socks, Luminati, Apify, IpVanish
- Cookie data re-utilization
- Custom HTTP METHODS

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

[](#installation)

### Install source from GitHub

[](#install-source-from-github)

To install the source code:

```
$ git clone https://github.com/devblack/curlx.git
$ cd curlx
$ composer install

```

And include it in your scripts:

```
require_once __DIR__ . '/vendor/autoload.php';

use Thevenrex\Curlx\CurlX;
$CurlX = new CurlX();

```

### Install with composer

[](#install-with-composer)

Install library with composer package manager \[php\]

```
$ composer require thevenrexoff/curlx

```

Contribute
----------

[](#contribute)

1. Check for open issues or open a new issue for a feature request or a bug
2. Fork [the repository](https://github.com/devblack/curlx) on GitHub to start making your changes to the `master` branch (or branch off of it)
3. Write a test which shows that the bug was fixed or that the feature works as expected
4. Send a pull request and bug me until I merge it

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

636d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c3155009391edd1472e1c75036e9e22383edbdcea1cba756493c238f0fcb69b8?d=identicon)[ThevenRexOff](/maintainers/ThevenRexOff)

---

Top Contributors

[![devblack](https://avatars.githubusercontent.com/u/33812115?v=4)](https://github.com/devblack "devblack (40 commits)")[![ThevenRexOff](https://avatars.githubusercontent.com/u/87929242?v=4)](https://github.com/ThevenRexOff "ThevenRexOff (3 commits)")[![Mateodioev](https://avatars.githubusercontent.com/u/68271130?v=4)](https://github.com/Mateodioev "Mateodioev (1 commits)")

### Embed Badge

![Health badge](/badges/thevenrex-curlx/health.svg)

```
[![Health](https://phpackages.com/badges/thevenrex-curlx/health.svg)](https://phpackages.com/packages/thevenrex-curlx)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
