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

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

firmaprofesional/curl
=====================

curl wrapper

1.2.1(2y ago)266.0k↓26.7%MITPHP

Since Feb 23Pushed 2y ago2 watchersCompare

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

READMEChangelog (7)Dependencies (2)Versions (22)Used By (0)

PHP Curl Class
==============

[](#php-curl-class)

This library provides an object-oriented wrapper of the PHP cURL extension.

If you have questions or problems with installation or usage [create an Issue](https://github.com/firmaprofesional/curl/issues).

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

[](#installation)

In order to install this library via composer run the following command in the console:

```
composer require firmaprofesional/curl
```

or add the package manually to your composer.json file in the require section:

```
"firmaprofesional/curl": "^0.3"
```

Usage examples
--------------

[](#usage-examples)

```
$curl = new CurlService();
$curlConfig = new CurlConfig();
$curlConfig->setCurlUrl('www.example.com');
$curl->configure($curlConfig);
$curl->send();
```

basic authentication

```
$curl = new CurlService();
$curlConfig = new CurlConfig();
$curlConfig->setCurlUrl('www.example.com');
$curlConfig->setUsername('user');
$curlConfig->setUserPassword('password');
$curl->configure($curlConfig);
$curl->send();
```

post fields

```
$curl = new CurlService();
$curlConfig = new CurlConfig();
$curlConfig->setCurlUrl('www.example.com');
$curlConfig->setMethodPOST();
$data_string = json_encode(array('data'));
$curlConfig->setHttpHeader(
    array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data_string),
    )
);

$curlConfig->setData($data_string);

$curl->configure($curlConfig);
$curl->send();
```

post fields with bearer token authentication

```
$curl = new CurlService();
$curlConfig = new CurlConfig();
$curlConfig->setCurlUrl('www.example.com');
$curlConfig->setMethodPOST();
$data_string = json_encode(array('data'));
$curlConfig->setHttpHeader(
    array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data_string),
        'Authorization: Bearer bearertoke'
    )
);

$curlConfig->setData($data_string);

$curl->configure($curlConfig);
$curl->send();
```

enable verbose mode will log on tmp path

```
$curl = new CurlService();
$curlConfig = new CurlConfig();
$curlConfig->setCurlUrl('www.example.com');
$curlConfig->setVerbose(true);
$curl->configure($curlConfig);
$curl->send();
```

set timeout in seconds

```
$curl = new CurlService();
$curlConfig = new CurlConfig();
$curlConfig->setCurlUrl('www.example.com');
$curlConfig->setTimeout(10);
$curl->configure($curlConfig);
$curl->send();
```

Testing
-------

[](#testing)

In order to test the library:

1. Create a fork
2. Clone the fork to your machine
3. Install the depencies `composer install`
4. Run the unit tests `./vendor/phpunit/bin/phpunit -c phpunit.xml --testsuite general`

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~164 days

Recently: every ~77 days

Total

14

Last Release

873d ago

Major Versions

0.6 → 1.02023-02-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f5356147aed31e116db098aec4d4514976c7a87eeb3fa5cac88ac9376e765dd?d=identicon)[firmarpofesional](/maintainers/firmarpofesional)

---

Top Contributors

[![mllagostera](https://avatars.githubusercontent.com/u/36759597?v=4)](https://github.com/mllagostera "mllagostera (11 commits)")[![obernado](https://avatars.githubusercontent.com/u/11837690?v=4)](https://github.com/obernado "obernado (11 commits)")[![gron92](https://avatars.githubusercontent.com/u/110541568?v=4)](https://github.com/gron92 "gron92 (5 commits)")

---

Tags

phpphp-librarycurlfirmaprofesional

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[rmccue/requests

A HTTP library written in PHP, for human beings.

3.6k34.5M258](/packages/rmccue-requests)[kriswallsmith/buzz

Lightweight HTTP client

2.0k31.3M443](/packages/kriswallsmith-buzz)[nategood/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

1.8k17.2M267](/packages/nategood-httpful)[mashape/unirest-php

Unirest PHP

1.3k9.7M161](/packages/mashape-unirest-php)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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