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

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

panwenbin/curl
==============

curl简单封装

0.2.1(6y ago)045212MITPHPPHP &gt;=5.4.0

Since Aug 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/panwenbin/curl)[ Packagist](https://packagist.org/packages/panwenbin/curl)[ RSS](/packages/panwenbin-curl/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)DependenciesVersions (8)Used By (2)

curl
====

[](#curl)

> curl简单封装，暂时主要为了方便的GET/POST/PATCH/HEAD/OPTIONS/DELETE，代替file\_get\_contents

简单使用示例
======

[](#简单使用示例)

```
use panwenbin\helper\Curl;

$res = Curl::to('https://github.com/panwenbin')->withHeader('User-Agent', 'PHP CURL')->get();
$res = Curl::to('http://www.example.com/')->withData(['username' => 'panwenbin', 'password' => 'password'])->post();
$res = Curl::to('http://www.example.com/source/1')->withData(['minPriceYuan' => 123])->patch();
$res = Curl::to('http://www.example.com/')->withData(['product_id' => '123'])->get();
$res = Curl::to('http://www.example.com/profile')->withCookieFile('cookiejar.txt')->get();
$imageFile = new \CURLFile($filename);
$res = Curl::to($uploadUrl)->withData(['media' => $imageFile])->withOption(CURLOPT_TIMEOUT, 180)->post();
if ($res->code == 200) {
    $html = $res->body;
}

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~257 days

Recently: every ~319 days

Total

6

Last Release

2328d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9246abb5bc6b21062bebdd5685fb7eda856f3208707e743b848d97a62d81935e?d=identicon)[panwenbin](/maintainers/panwenbin)

---

Top Contributors

[![panwenbin](https://avatars.githubusercontent.com/u/19491104?v=4)](https://github.com/panwenbin "panwenbin (14 commits)")[![icest](https://avatars.githubusercontent.com/u/7161902?v=4)](https://github.com/icest "icest (2 commits)")

---

Tags

curl

### Embed Badge

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

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

###  Alternatives

[rmccue/requests

A HTTP library written in PHP, for human beings.

3.6k36.3M275](/packages/rmccue-requests)[kriswallsmith/buzz

Lightweight HTTP client

1.9k31.9M462](/packages/kriswallsmith-buzz)[nategood/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

1.8k17.5M274](/packages/nategood-httpful)[mashape/unirest-php

Unirest PHP

1.3k9.9M163](/packages/mashape-unirest-php)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48348.5M435](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84711.1M80](/packages/smi2-phpclickhouse)

PHPackages © 2026

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