PHPackages                             orel/simplecurl - 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. orel/simplecurl

ActiveLibrary

orel/simplecurl
===============

PHP Curl Class is an object-oriented wrapper of the PHP cURL extension.

09PHP

Since Jan 26Pushed 11y ago2 watchersCompare

[ Source](https://github.com/2byte/simplecurl)[ Packagist](https://packagist.org/packages/orel/simplecurl)[ RSS](/packages/orel-simplecurl/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Simple curl wrapper for php &gt;= 5.4
-------------------------------------

[](#simple-curl-wrapper-for-php--54)

Install composer
----------------

[](#install-composer)

Add composer.json require `"orel/simplecurl": "dev-master"`

Usage
=====

[](#usage)

```
use simplecurl\SCurl;

$curl = new SCurl();
$response = $curl->get('http://example.com', ['q1' => 1, q2 => 2], [CURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT']])->exec();

var_dump($response->headers);
var_dump($response->info);
var_dump($response);

echo $response;

$response SCurl::instance()
    ->post('http://example.com', ['field1' => 'val1'])
    ->setHeader('X-Requested-With', 'XMLHttpRequest')
    ->setHeader(['X-Requested-With:XMLHttpRequest', 'Referer:http://example.com'])
    ->setAjax()
    ->setUserAgent('Simple curl')
    ->setReferer('http://example.com')
    ->setCookieFile(__DIR__. 'cookie.txt')
    ->setCookie('key', 'val')
    ->setCookie(['key' => 'val'])
    ->setCookieString('key=val;key=val')
    ->setLocation(true)
    ->exec();

var_dump($response->headers);
var_dump($response->info);
echo $response;

if (isset($response->errno) AND isset($response->error)) {
    echo '['. $response->errno .']'. $response->error;
}

// Response in callback functions

$response = SCurl::instance()
    ->post('http://example.com', ['field1' => 'val1'])
    ->setHeader('X-Requested-With', 'XMLHttpRequest')
    ->setHeader(['X-Requested-With:XMLHttpRequest', 'Referer:http://example.com'])
    ->success(function ($response)) {
        return $response;
    })
    ->error(function ($errorobj) {
        echo '['. $errorobj->errno .']'. $errorobj->error;
    })
    ->exec();
```

###  Health Score

20

—

LowBetter than 17% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9df3354fa84198c15ee7568001242dbc5abe12bf16d46085ed70708b4dc2f95a?d=identicon)[Orel](/maintainers/Orel)

---

Top Contributors

[![2byte](https://avatars.githubusercontent.com/u/6646993?v=4)](https://github.com/2byte "2byte (1 commits)")

### Embed Badge

![Health badge](/badges/orel-simplecurl/health.svg)

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

PHPackages © 2026

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