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

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

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

Personal curl library

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

Since Apr 12Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (1)

介绍

```
个人使用的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 43% 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

2217d 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)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M315](/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.8M290](/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)
