PHPackages                             andhikayuana/curl-lib - 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. andhikayuana/curl-lib

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

andhikayuana/curl-lib
=====================

simple curl library

2.0.0(5y ago)3103[1 issues](https://github.com/andhikayuana/curl-lib/issues)[2 PRs](https://github.com/andhikayuana/curl-lib/pulls)MITPHP

Since Nov 12Pushed 4y ago2 watchersCompare

[ Source](https://github.com/andhikayuana/curl-lib)[ Packagist](https://packagist.org/packages/andhikayuana/curl-lib)[ RSS](/packages/andhikayuana-curl-lib/feed)WikiDiscussions master Synced today

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

Simple cURL Library
===================

[](#simple-curl-library)

[![](https://camo.githubusercontent.com/3d76e2978831727dd17dfdb8d9b9c961b513f24ef2d3da0ddf7c97c393acf7a6/68747470733a2f2f62616467656e2e6e65742f6769746875622f72656c656173652f616e6468696b617975616e612f6375726c2d6c69623f69636f6e3d67697468756226636f6c6f723d677265656e)](https://camo.githubusercontent.com/3d76e2978831727dd17dfdb8d9b9c961b513f24ef2d3da0ddf7c97c393acf7a6/68747470733a2f2f62616467656e2e6e65742f6769746875622f72656c656173652f616e6468696b617975616e612f6375726c2d6c69623f69636f6e3d67697468756226636f6c6f723d677265656e)[![](https://camo.githubusercontent.com/1e344b431e3e1a6c463ac8e09ea562f31687a72534e511b3e727cf54c2c10cfc/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f616e6468696b617975616e612f6375726c2d6c69623f636f6c6f723d6f72616e6765)](https://camo.githubusercontent.com/1e344b431e3e1a6c463ac8e09ea562f31687a72534e511b3e727cf54c2c10cfc/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f616e6468696b617975616e612f6375726c2d6c69623f636f6c6f723d6f72616e6765)[![](https://camo.githubusercontent.com/a027144f1dea6c4726c6b8a113c7bf9119ec212db48a0fa6722f316d6fcc1ca6/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f6c6963656e73652f616e6468696b617975616e612f6375726c2d6c6962)](https://camo.githubusercontent.com/a027144f1dea6c4726c6b8a113c7bf9119ec212db48a0fa6722f316d6fcc1ca6/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f6c6963656e73652f616e6468696b617975616e612f6375726c2d6c6962)

Simple wrapper for cURL using PHP.

> ***NOTE:*** Supported composer package from v2.0.0, If you need native version you can check [v1.0.0](https://github.com/andhikayuana/curl-lib/tree/v1.0.0)

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

[](#installation)

```
composer require andhikayuana/curl-lib
```

Usage
-----

[](#usage)

Create instance

```
require 'vendor/autoload.php';

$curl = new \Yuana\Curl();
```

HTTP GET method

```
$res = $curl->get('http://api.halo.com/users');

// using query
// http://api.halo.com/users?users_id=2
$res = $curl->get('http://api.halo.com/users', [
    'users_id' => 2
]);
```

HTTP POST method

```
$res = $curl->post('http://api.halo.com/login', [
    'username' => 'yuana',
    'password' => 'yourpassword'
]);
```

HTTP PUT method

```
$res = $curl->put('http://api.halo.com/users', [
    'users_id' => 3,
    'users_name' => 'Yuana Andhika',
    'users_dept' => 'Android Developer'
]);
```

HTTP DELETE method

```
$res = $curl->delete('http://api.halo.com/users', [
    'users_id' => 3
]);
```

Uploading file

```
$res = $curl->upload('http://api.domain.com/upload', [
    'fieldA' => '/path/to/file/fileA.jpg',
    'fieldB' => '/path/to/file/fileB.jpg',
]);
```

Configuration

```
//override timeout [default 30]
$curl->timeout = 25;

//override redirection [default true]
$curl->isRedirect = false;

//override user agent [default from http user agent]
$curl->userAgent = 'Android App 1.1';

//override headers
$curl->headers = [
    'Authorization' => 'Bearer yourtokenhere'
];
```

Contributing
------------

[](#contributing)

Feel free to check [CONTRIBUTING.md](./CONTRIBUTING.md) file

Todos
-----

[](#todos)

- Proxy
- Composer Package

Donation
--------

[](#donation)

[![ko-fi](https://camo.githubusercontent.com/1fedf764fa06114b797ee53e7506df10880abed6766f854202d758df1707969d/68747470733a2f2f7777772e6b6f2d66692e636f6d2f696d672f676974687562627574746f6e5f736d2e737667)](https://ko-fi.com/T6T02OS5W)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

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

2055d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10376354?v=4)[Andhika Yuana](/maintainers/andhikayuana)[@andhikayuana](https://github.com/andhikayuana)

---

Top Contributors

[![andhikayuana](https://avatars.githubusercontent.com/u/10376354?v=4)](https://github.com/andhikayuana "andhikayuana (19 commits)")[![fannyhasbi](https://avatars.githubusercontent.com/u/11705665?v=4)](https://github.com/fannyhasbi "fannyhasbi (5 commits)")

---

Tags

composercurlcurl-librarycurlphpphp-libraryphp-packagewrapper

### Embed Badge

![Health badge](/badges/andhikayuana-curl-lib/health.svg)

```
[![Health](https://phpackages.com/badges/andhikayuana-curl-lib/health.svg)](https://phpackages.com/packages/andhikayuana-curl-lib)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.8k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M89](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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