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

ActiveLibrary

sreeb/curl
==========

Personal curl library

v1.0.0(5y ago)3179↓100%1proprietaryPHPPHP &gt;=7.0.0

Since Apr 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sreeb228/curl)[ Packagist](https://packagist.org/packages/sreeb/curl)[ RSS](/packages/sreeb-curl/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

介绍

```
个人使用的curl库

```

安装

```
composer require sreeb/curl

```

使用方式

```
$curl = Curl::getInstance();
$result = $curl
    ->setHeader(['header0' => '0', 'header1' => '1'])//array设置header
    ->setHeader('header2', '2')//键值设置header
    ->setCookie(['cookie0' => '0', 'cookie1' => '1'])//array设置cookie
    ->setCookie('cookie2', '2')//键值设置cookie
    ->setCookie('./cookie.txt')//文件设置cookie
    ->setResponseCookieStorable('./cookie.txt')//设置响应cookie存储路径
    ->setTimeout(3, 3)//链接超时,等待超时
    ->setSSL(false)//跳过SSL证书验证
    ->setProxy('192.168.0.1', '8080', 'username', '123456')//设置代理IP访问
    ->request('http://www.example.com/', 'post', ['parameter' => 'value', 'file' => new \CURLFile(realpath('./image.png'), 'image/png', 'image')], false)
    ->setLocation(true, 1)//获取重定向后的内容，最多重定向次数
    ->send(false);//发送请求（是否关闭cUrl资源，默认关闭,不关闭可以继续使用$curl进行请求，减少资源开销和重复设置项），返回响应结果对象

if ($result->getErrno() == 0) {
    print_r($result->getResponse());//获取响应数据(含header头)
    print_r($result->getInfo());//获取curlinfo
    print_r($result->getInfo('http_code'));//获取HTTP响应码
    print_r($result->getHeader());//获取header
    print_r($result->getBody());//获取内容
} else {
    print_r($result->getError());
}

```

###  Health Score

26

—

LowBetter than 46% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

2170d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a3bac716a69383a676c166f6837cc2934b56751c392948352e4881df783d6405?d=identicon)[sreeb](/maintainers/sreeb)

---

Top Contributors

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

### Embed Badge

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

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

PHPackages © 2026

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