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

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

wenpeng/curl
============

一个轻量级的PHP网络操作类，实现GET、POST、UPLOAD、DOWNLOAD常用操作，出错自动重试，支持链式写法

v1.0.1(9y ago)137681562MITPHPPHP &gt;=5.1

Since Oct 9Pushed 7y ago5 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (2)

关于
==

[](#关于)

PHP-Curl是一个轻量级的网络操作类，实现GET、POST、UPLOAD、DOWNLOAD常用操作，支持方法链写法

需求
==

[](#需求)

对低版本做了向下支持，但建议使用 PHP 5.3 +

安装
==

[](#安装)

```
composer require wenpeng/curl
```

```
use Wenpeng\Curl\Curl;
```

示例
==

[](#示例)

```
$curl = new Curl;
```

或者

```
$curl = Curl::init();
```

##### GET:

[](#get)

```
$curl->url(目标网址);
```

##### POST:

[](#post)

```
$curl->post(变量名, 变量值)->post(多维数组)->url(目标网址);
```

##### UPLOAD:

[](#upload)

```
$curl->post(多维数组)->file($_FILE字段, 本地路径, 文件类型, 原始名称)->url(目标网址);
```

##### DOWNLOAD:

[](#download)

```
$curl->url(文件地址)->save(保存路径);
```

##### 配置

[](#配置)

参考:

```
$curl->set('CURLOPT_选项', 值)->post(多维数组)->url(目标网址);
```

##### 自动重试

[](#自动重试)

```
// 出错自动重试N次(默认0)
$curl->retry(3)->post(多维数组)->url(目标网址);
```

##### 结果

[](#结果)

```
// 任务结果状态
if ($curl->error()) {
    echo $curl->message();
} else {
    // 任务进程信息
    $info = $curl->info();

    // 任务结果内容
    $content = $curl->data();
}
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.7% 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 ~30 days

Total

2

Last Release

3479d ago

### Community

Maintainers

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

---

Top Contributors

[![wenpeng](https://avatars.githubusercontent.com/u/11190229?v=4)](https://github.com/wenpeng "wenpeng (43 commits)")[![webphper](https://avatars.githubusercontent.com/u/24785590?v=4)](https://github.com/webphper "webphper (1 commits)")

---

Tags

curldownload-filelightweightphp-curlupload-filephp-curlcurl librarycurl postcurl lightweightcurl uploadcurl download

### Embed Badge

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

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

###  Alternatives

[friendsofsymfony/rest-bundle

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

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)[codeception/module-phpbrowser

Codeception module for testing web application over HTTP

6529.8M508](/packages/codeception-module-phpbrowser)[athlon1600/php-curl-client

Simple PHP cURL Client

13112.2k3](/packages/athlon1600-php-curl-client)

PHPackages © 2026

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