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. [HTTP &amp; Networking](/categories/http)
4. /
5. orel/simplecurl

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

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 1mo ago

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 14% 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)
```

###  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)
