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

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

masnathan/curl
==============

Another CURL Object.

0.0.2(12y ago)18.5k↓33.3%MITPHP &gt;=5.4

Since Dec 27Compare

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

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

\#Curl

[![Downloads with Composer](https://camo.githubusercontent.com/0f49374e337d22e507cd74b1ecb9c090f740c9049dae12bce78cea4943a5848d/68747470733a2f2f706f7365722e707567782e6f72672f6d61736e617468616e2f6375726c2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/masnathan/curl)[![SensioLabs Insight](https://camo.githubusercontent.com/2dd0a7d3575fea4afb173fc65f2544e02b5137d42510333de687aaf9bf0601cd/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f36643932333164382d393134302d346230322d393532322d3564336333616133643666322f6d696e692e706e67)](https://insight.sensiolabs.com/projects/6d9231d8-9140-4b02-9522-5d3c3aa3d6f2)[![ReiDuKuduro @gittip](https://camo.githubusercontent.com/7e9efc67c5c98dcf25825fab912f954aeea2e8e8aebde707a368dcf21875fc94/687474703a2f2f626f74746c6570792e6f72672f646f63732f6465762f5f7374617469632f4769747469702e706e67)](https://www.gittip.com/ReiDuKuduro/)

Another Curl Library...

How to install via Composer
===========================

[](#how-to-install-via-composer)

The recommended way to install is through [Composer](http://composer.org).

```
# Install Composer
$ curl -sS https://getcomposer.org/installer | php

# Add curl as a dependency
$ php composer.phar require masnathan/curl:dev-master
```

Once it's installed, you need to require Composer's autoloader:

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

\#How to use

\##The basic way

```
$curl = new Curl();

//These are the fast-forward methods
$curl->get(string $url [, array $params]);
$curl->post(string $url [, array $params]);
$curl->put(string $url [, array $params]);
$curl->delete(string $url [, array $params]);

//or you can do it like a true ninja
$response = $curl
            ->init()
            ->setOpt(CURLOPT_URL, 'http://somedomain.com/')
            ->setOpt(CURLOPT_SSL_VERIFYHOST, 0)
            ->setOpt(CURLOPT_SSL_VERIFYPEER, false)
            ->setOpt(CURLOPT_CONNECTTIMEOUT, 5)
            ->setOpt(CURLOPT_RETURNTRANSFER, true)
            ->execute();
$curl->close();

//or you can login onto a website
$curl->init();
$login_page   = $curl->login('http://somedomain.com/login', array('username' => 'my_user', 'password' => 'my_fancy_password'), '/path/to/my/cookie.txt');
$private_page = $curl->get('http://somedomain.com/private_page');
```

\##The "not so basic until you know it" way

```
//These are the fast-forward methods
Ch::get( string $url [, array $params [, function $callback [, string $data_type]]]);
Ch::post( string $url [, array $params [, function $callback [, string $data_type]]]);
Ch::postJson( string $url [, array $params [, function $callback [, string $data_type]]]);
Ch::postXml( string $url [, array $params [, function $callback [, string $data_type]]]);
Ch::put( string $url [, array $params [, function $callback [, string $data_type]]]);
Ch::delete( string $url [, array $params [, function $callback [, string $data_type]]]);

//Here are a few examples:
Ch::get('http://somedomain.com');
Ch::get('http://somedomain.com', array('param1' => 'some value', 'param2' => 'some other value'));
Ch::get('http://somedomain.com', array('param1' => 'some value', 'param2' => 'some other value'), function(data) { var_dump($data); });
Ch::get('http://somedomain.com', array('param1' => 'some value', 'param2' => 'some other value'), function(data) { var_dump($data); }, 'json');
Ch::get('http://somedomain.com', array('param1' => 'some value', 'param2' => 'some other value'), 'json');
Ch::get('http://somedomain.com', 'xml');
Ch::get('http://somedomain.com', function(data) { var_dump($data); }, 'json');
//Any of the above examples is aceptable
```

License
=======

[](#license)

This library is under the MIT License, see the complete license [here](LICENSE)

\###Is your project using `MASNathan\Curl`? \[Let me know\]([https://github.com/ReiDuKuduro/Curl/issues/new?title=New%20script%20using%20Curl&amp;body=Name](https://github.com/ReiDuKuduro/Curl/issues/new?title=New%20script%20using%20Curl&body=Name) and Description of your script.)!

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

4510d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2139464?v=4)[André Filipe](/maintainers/MASNathan)[@MASNathan](https://github.com/MASNathan)

---

Top Contributors

[![MASNathan](https://avatars.githubusercontent.com/u/2139464?v=4)](https://github.com/MASNathan "MASNathan (17 commits)")

---

Tags

curl

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/masnathan-curl/health.svg)](https://phpackages.com/packages/masnathan-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)
