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

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

darkfriend/php7-curl
====================

PHP7 curl helper

1.0.5(5y ago)19441PHPPHP &gt;=7.0

Since Dec 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/darkfriend/php7-curl)[ Packagist](https://packagist.org/packages/darkfriend/php7-curl)[ Docs](https://github.com/darkfriend/php7-curl)[ RSS](/packages/darkfriend-php7-curl/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (6)Dependencies (4)Versions (7)Used By (1)

CurlHelper - хелпер для удобной работы с CURL
=============================================

[](#curlhelper---хелпер-для-удобной-работы-с-curl)

`composer require darkfriend/php7-curl`

- `CurlHelper::getInstance($newSession = false, $options = [])` - return instance CurlHelper
- `CurlHelper::getInstance($newSession = false, $options = [])->request($url, $data = [], $method = 'post', $requestType = '', $responseType = 'json')` - do request to url

### Support request method type

[](#support-request-method-type)

- post
- get
- put
- delete
- options
- head
- custom

### Support request type

[](#support-request-type)

- json
- xml
- custom

### Support response type

[](#support-response-type)

- json
- xml
- custom

Example1
--------

[](#example1)

```
$url = 'http://site.ru';
$curl = \darkfriend\helpers\CurlHelper::getInstance();
$response = $curl->request($url);

// $response - array response site.ru
// $curl->lastCode - response http code
// $curl->lastHeaders - response http headers
```

Example2: CurlHelper with custom headers
----------------------------------------

[](#example2-curlhelper-with-custom-headers)

```
$url = 'http://site.ru';
$curl = \darkfriend\helpers\CurlHelper::getInstance();
$response = $curl->setHeaders([
            'Accept-Language' => 'ru-RU',
            'Custom-Head' => 'custom',
        ])
        ->request($url);

// $response - array response site.ru
// $curl->lastCode - response http code
// $curl->lastHeaders - response http headers
```

Example3: CurlHelper with debug
-------------------------------

[](#example3-curlhelper-with-debug)

```
$url = 'http://site.ru';
$curl = \darkfriend\helpers\CurlHelper::getInstance(false,[
    'debug' => true,
    'debugFile' => __DIR__.'/logs'
]);
$response = $curl->request($url);

// $response - array response site.ru
// $curl->lastCode - response http code
// $curl->lastHeaders - response http headers
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~96 days

Recently: every ~120 days

Total

6

Last Release

1856d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/302f1cdc7cb85fc89550bad0c164e195b831f50de8a2a148fa754670d5f328cc?d=identicon)[darkfriend](/maintainers/darkfriend)

---

Top Contributors

[![darkfriend](https://avatars.githubusercontent.com/u/7825114?v=4)](https://github.com/darkfriend "darkfriend (7 commits)")

---

Tags

curlhelperphpphp7requestphphelperdevcurldevelopmentPHP7darkfriend

### Embed Badge

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

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

###  Alternatives

[stefangabos/zebra_curl

A high performance solution for making multiple HTTP requests concurrently, asynchronously from your PHP projects using cURL

21971.3k2](/packages/stefangabos-zebra-curl)

PHPackages © 2026

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