PHPackages                             esyede/curly - 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. esyede/curly

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

esyede/curly
============

Standalone cURL library (single file, no dependencies)

v1.0.2(3y ago)261MITPHPPHP &gt;=5.4

Since Feb 13Pushed 3y ago1 watchersCompare

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

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

curly
=====

[](#curly)

Standalone cURL library (single file, no dependencies)

### Requirements

[](#requirements)

- PHP 5.4 or newer

### Installation

[](#installation)

Run the following command from your CLI to install package from the packagist

```
composer require esyede/curly

```

### Sending request

[](#sending-request)

Now, let's try sending simple request using this library:

**Sending a GET request:**

```
use Esyede\Curly;

$response = Curly::get('https://reqres.in/api/users?page=2');
```

**Sending a POST request:**

```
$parameters = ['name' =>  'Danang', 'age' => 25];

$response = Curly::post('https://reqres.in/api/users', $parameters);
```

**Sending a PUT request:**

```
$parameters = ['name' =>  'Agus', 'age' => 24];

$response = Curly::put('https://reqres.in/api/users', $parameters);
```

**Sending a DELETE request:**

```
$parameters = ['id' => 6];

$response = Curly::delete('https://reqres.in/api/users', $parameters);
```

**Downloading file:**

```
if (Curly::download('https://github.com/esyede/eddie/archive/master.zip', 'eddie.zip')) {
	// Yay! file is downloaded!
}
```

### Receiving response

[](#receiving-response)

Every request will returns an `stdClass` object which has 2 properties:

- `$header` that will contains the response headers.
- `$body` that will contains the response body.

So, you can easily dump it to see what's inside:

```
print_r($response->header);

print_r($response->body);
```

### Custom options

[](#custom-options)

You can also add or replace default options with your custom options. For example, let's change the http header and redirection option:

```
$parameters =[];

$custom_options = [
	CURLOPT_FOLLOWLOCATION => true,
	CURLOPT_HTTPHEADER => [
		'Cache-Control: no-cache',
		'Accept-Encoding: gzip, deflate',
		'Accept-Language: en-US,en;q=0.5',
	],
];

$response = Curly::get('https://foobar.com', $parameters, $custom_options);
```

List of supported options is available on the [PHP cURL documentation](https://www.php.net/manual/en/function.curl-setopt.php).

That's pretty much it. Thank you for stopping by!

### License

[](#license)

This library is licensed under the [MIT License](http://opensource.org/licenses/MIT)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% 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

Unknown

Total

1

Last Release

1182d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10582583?v=4)[Suyadi](/maintainers/esyede)[@esyede](https://github.com/esyede)

---

Top Contributors

[![esyede](https://avatars.githubusercontent.com/u/10582583?v=4)](https://github.com/esyede "esyede (14 commits)")[![zerosdev](https://avatars.githubusercontent.com/u/33526722?v=4)](https://github.com/zerosdev "zerosdev (6 commits)")

---

Tags

curlphp

### Embed Badge

![Health badge](/badges/esyede-curly/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

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

2.8k73.3M318](/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.8M292](/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)
