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)318811proprietaryPHPPHP &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 2w 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

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

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

2263d 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

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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